One of two felony indictments against former Texas Gov. Rick Perry was tossed out Friday, giving the Republican presidential candidate a potentially huge legal victory in the face of flagging polling numbers for the 2016 race.

The 3rd Court of Appeals in Austin sided Friday with Perry's high-powered legal team in ruling that the charge of coercion of a public servant essentially constituted a violation of Perry's free speech rights.

Perry was indicted last August on the coercion charge and a separate charge of abuse of official power, which wasn't affected by the ruling. It's still likely he'll have to face that charge.

The case stems from Perry publicly threatening, and then exercising, a veto of state funding for public corruption prosecutors. His move came in the wake of the Democrat who heads the investigative unit rebuffing Perry's calls to resign after she was convicted and jailed for drunken driving.

Michael McCrum, the San Antonio-based special prosecutor leading the case, did not immediately return a call seeking comment. He will likely have the option of further appealing Friday's decision.

Lead Perry counsel Tony Buzbee called the decision "a clear step towards victory for the rule of law."

"The only remaining count we believe to be a misdemeanor, and the only issue is whether the governor's veto -- or any veto in the absence of bribery -- can ever be illegal," Buzbee said. "The appeals court made clear that this case was questionable ... and we are confident that once it is put before the court, it will be dismissed on its face."

Perry left office in January and has spent most of his time campaigning in the early-voting states Iowa, New Hampshire and South Carolina, but polls show him badly trailing the race's front-runners. He made a single court appearance in the matter, which so far hasn't affected his 2016 campaign schedule.

The former governor has for months called the case against him politically motivated, but the Republican trial judge repeatedly refused to toss it on constitutional grounds, which prompted the appeal. McCrum has said Perry deserves to go to trial based on the evidence -- not politics.

Still, the court wrote, the coercion charge "violates the First Amendment and, accordingly, cannot be enforced."