AUSTIN - Texas' highest criminal court on Wednesday tossed out the remaining abuse-of-power charge against Rick Perry, lifting the legal cloud the former Texas governor had blamed in part for his inability to raise enough money to mount a successful 2016 presidential campaign.

From the moment a Travis County grand jury handed up a two-count indictment in 2014, Perry had blasted the charges as politically motivated. He continued that defense Wednesday.

"The court's decision proves that this indictment was nothing less than a baseless political attack, an assault on the constitutional powers of the office of the governor and the constitutional checks and balances that provide a foundation of our democracy," Perry said at a brief news conference several hours after the decision by the Texas Court of Criminal Appeals.

Presiding Judge Sharon Keller – in an outcome joined by five other justices and opposed by two – ordered the dismissal of the indictment in a case that had dogged the last months of Perry's record term in office and his second unsuccessful bid for president.

Perry was the first to drop out of the crowded Republican presidential field last September, saying his exclusion from the main stage in televised debates and his inability to raise enough money had doomed his campaign. It was his second failed attempt to win the GOP nod for president.

The criminal case centered on whether Perry, a Republican, improperly used his gubernatorial veto power over state budget dollars to try to force Travis County's Democratic district attorney to resign after her messy, high-profile drunken-driving arrest.

A "rogue prosecutor"

The case arose when Perry, nearly three years ago, vetoed state funding for the public integrity unit overseen by Travis County District Attorney Rosemary Lehmberg, who served time but declined to resign after her 2013 drunken-driving incident. Perry said she had lost the public's confidence.

The government watchdog group Texans for Public Justice filed a complaint over Perry's veto, saying the governor had the authority to cut the funding but that he overstepped in trying to leverage that power to force out Lehmberg. The complaint led to his 2014 indictment on one count of abuse of official capacity, a first-degree felony punishable by five to 99 years in prison, and one count of coercion of a public servant, a third-degree felony carrying a punishment of two to 10 years in prison.

Perry said he acted properly, would do it again and that the charges against him violated separation of powers. He blamed the grand jury indictment on a "rogue organization with a rogue prosecutor."

The special prosecutor in the case, Michael McCrum, repeatedly had denied politics played any role in the indictments or his prosecution of the case.

On Wednesday, however, McCrum suggested politics was at play in the court's decision to toss the case, noting that Perry, who ended his bid for the 2016 Republican nomination for president, recently had thrown his support to U.S. Sen. Ted Cruz and has maintained a high profile campaigning for him.

"The cynics around me tell me, how could I ever possibly expect – after Rick Perry was appointed a lead role in Ted Cruz's campaign, a senator from Texas – that Rick Perry would sit in a trial this year and let all of the evidence come out?" McCrum said in an interview. "I was a fool, I was told, to think that a Republican court was going to allow that to happen," McCrum said. "I was naive enough to believe that our criminal justice system could withstand the power of politics. Unfortunately in the case of Rick Perry, in this election year, it could not."

Perry lawyer Tony Buzbee of Houston contended, "Mr. McCrum shouldn't be saying anything about anything. A prosecutor, at least those who are actually elected, are supposed to uphold the law. What he did was attempt to pervert it. It is a damn shame this thing was brought in the first place, and he should be ashamed of himself for bringing it."

Double-jeopardy

Perry's legal team fought for more than a year to get the case dismissed without a trial, winning half the battle last year when the Austin-based 3rd Court of Appeals tossed out one of the two counts against him. The lower appellate court ruled that the law underlying that coercion charge violated the First Amendment.

The state had urged the Court of Criminal Appeals to reinstate the charge alleging coercion of a public servant. Perry, meanwhile, fought the remaining abuse of official capacity count.

The state had said – and lower courts agreed – that it was too early in the case to address Perry's arguments against that abuse-of-power charge, saying that according to precedent set by the high court, it only could happen after evidence was heard at a trial. Perry's lawyers had argued that the abuse-of-power law was unconstitutional as it was applied to his circumstances.

Keller's opinion, however, put Perry's separation-of-powers complaint in the same special category as claims against double jeopardy, being tried twice for the same crime.

Such claims are allowed to be raised before trial "because the rights underlying those claims would be effectively undermined if not vindicated before trial," Keller wrote.

In Perry's case, she wrote: "When the only act that is being prosecuted is a veto, then the prosecution itself violates separation of powers."

The only Democrat on the court, Judge Lawrence E. Meyers, issued a forceful dissent.

"After reading the majority's opinion, it seems clear to me that it has decided to employ any means necessary in order to vacate the two felony counts against Gov. Perry," Meyers wrote. "The majority opinion has repealed more statutes and made more new law than Gov. Perry did in the last session of the Legislature when he tried to muscle out the elected Travis County district attorney."

The other dissent came from Judge Cheryl Johnson, who said the main court opinion "stretches constitution, case law, and statute beyond where I am willing to follow.

Governor is "different"

Professor Geary Reamey of St. Mary's University School of Law said the Texas Court of Criminal Appeals "is not known to be particularly receptive" to petitions from defendants, "even in cases in which there is strong factual evidence of wrongful conviction or actual innocence.

"In this case, the majority takes the position that a governor is 'different,' as are other governmental officials, when their official actions are challenged. In this sense, the opinion in the Perry case is a narrow and limited one. I suspect the court will be accused of judicial activism in its ruling because it goes beyond its own prior precedent by creating special rules for those in government," Reamey said.

The fact that the judges in the majority share Perry's party is "a point that seems certain – fairly or unfairly – to fuel speculation," Reamey said.

On the political front for Perry, University of Houston political scientist Brandon Rottinghaus said the decision gives the former governor "extended credibility in the state where he is politically strong and influential" and could boost his chances at a cabinet post if a Republican becomes president.

"The indictment made him a marked man, but this ruling puts him right back in the saddle," he said.

Rottinghaus also said it has broader implications for Cruz, giving "fresh legs" to his message that "the Texas way can be the nation's way," and for the Texas GOP.

"This is a personal win for Perry and a political win for the Republican Party in Texas," he said. "Fear that the party would be tainted by Perry's indictment for election cycles to come are all but gone."

A tout to Travis

The road to Wednesday's decision was a costly one for Perry. The tab for his high-powered legal team, led by Buzbee, was about $2.5 million as of last month, campaign finance documents show.

After initially relying on taxpayer funds, Perry paid most of that from his state campaign account. Buzbee said there is no mechanism for him to ask for reimbursement in the state criminal system.

Perry, however, gave little evidence of concern, going out for ice cream Wednesday just as he did when he was booked in 2014, and tweeting a photo of himself with an adviser and spokesman, their soft-serve cones held aloft. He even included a reference to Alamo hero William Barret Travis.

"Epic legal victory falls on the 180th anniversary of Col. Travis's Victory or Death letter: 'I shall never surrender or retreat,'" Perry tweeted.