A Texas appeals court tossed the criminal conviction of former U.S. House Majority Leader Tom DeLay on Thursday, saying there was insufficient evidence for a jury in 2010 to have found him guilty of illegally funneling money to Republican candidates.

The Texas 3rd Court of Appeals said prosecutors failed to prove that the money being laundered was illegally obtained, which the court said was required for a money laundering conviction. Prosecutors alleged that DeLay illegally channel $190,000 in corporate donations though his political action committee and into Texas legislative races, where corporate money is barred.

“The fundamental problem with the State’s case was its failure to prove proceeds of criminal activity,” the court wrote in a 2-1 decision.

Justices on the appeals court suggested that even jurors appeared confused during deliberations, based on questions they asked about whether the charge required that the money be illegally obtained in the first place.

DeLay was meeting with religious conservatives in Washington when he learned of the court’s ruling.

“We were all basically on our knees praying and my lawyer calls and says, ‘You’re a free man,’ ” the former Texas congressman said. “It’s a really happy day for me and I just thank the Lord for carrying me through all of this.”

State prosecutors said they would appeal to Texas’ highest criminal court.

“We are concerned and disappointed that two judges substituted their assessment of the facts for that of 12 jurors who personally heard the testimony of over 40 witnesses over the course of several weeks and found that the evidence was sufficient and proved DeLay’s guilt beyond a reasonable doubt,” the Travis County District Attorney’s office said in a statement.

DeLay was found guilty by a jury in Austin of money laundering and conspiracy to commit money laundering. Prosecutors said the money he funneled to local candidates helped Republicans take control of the Texas House, enabling them to push through a DeLay-engineered congressional redistricting plan that sent more Republicans to Congress in 2004, strengthening his political power.

Delay, whose heavy-handed style while holding the No. 2 job in the U.S. House earned him the nickname “the Hammer,” was sentenced to three years in prison. His sentence had been on hold during the appeals process.

Prosecutors alleged that DeLay accepted $190,000 in corporate donations to his Texas-based political action committee, then sent that money to an arm of the Washington-based Republican National Committee. The RNC then sent the same amount of money to seven Texas House candidates in 2002. Under state law, corporate money cannot be given directly to political campaigns.

Prosecutors said Delay conspired with two associates to pull off the scheme during a three-week trial. After 19 hours of deliberations, jurors agreed.

But in a 22-page opinion, the appeals court said prosecutors “failed in its burden to prove that the funds that were delivered to the seven candidates were ever tainted.” The court called the evidence “legally insufficient” to support a money laundering charge.

The lone dissent was Chief Justice Woodie Jones, the only Democrat on the six-member appeals court.

On Thursday, Delay said the case and conviction hadn’t been a burden.

“I’m not saying it was easy to go through,” DeLay said. “On the other hand, if you read the ruling (it says) this is an outrageous criminalization of politics. … In the ruling they say I should have never even been charged, much less indicted.”