A federal appeals court on Tuesday overturned the conviction of former New York state Senate leader Dean Skelos, dealing another blow to ex-U.S. attorney Preet Bharara's prosecutorial record.

Bharara was fired by President Trump earlier this year and has since emerged as a prominent Trump critic.

During his time in office, he launched a high-profile anti-corruption campaign targeting Skelos and others.

But the 2nd Circuit Court of Appeals threw out the conviction of Skelos and his son, granting new trials. The court found jurors in the case were wrongly instructed, in light of a Supreme Court decision following their 2015 convictions. The high court ruling narrowed the definition of a corrupt act.

“Because we cannot conclude that the [instruction] error was harmless beyond a reasonable doubt, we are obliged to vacate the convictions,” the court wrote.

The decision came less than three months after the court reversed former state Assembly Speaker Sheldon Silver's separate corruption conviction on the same grounds. Skelos is a Republican, Silver a Democrat.

Acting Manhattan U.S. Attorney Joon Kim said that they are “disappointed in the decision” and plan to weigh their appellate options.

“We look forward to a prompt retrial where we will have another opportunity to present the overwhelming evidence of Dean Skelos and Adam Skelos’s guilt and again give the public the justice it deserves,” Kim said in a statement. “Cleaning up corruption is never easy, and that is certainly true for corruption in New York State government.”

He added: “But we are committed as ever to doing everything we can to keep our government honest. That is what we will do in this prosecution as well.”

The decision Tuesday is a major setback for Bharara, who was fired by Trump in March. He has since carved out a post-office career as a commentator, while regularly criticizing Trump's policies and comments on Twitter.

Bharara tweeted that the ruling was "not unexpected, but still disappointing, given there was more than enough evidence to convict as the appeals court itself found." He did not respond to Fox News’ request for comment.

Skelos and his son, Adam, were convicted of federal extortion charges in 2015. The elder Skelos was accused of strong-arming three companies with a stake in state legislation—a major real estate developer, an environmental technology company and a medical malpractice insurer—into giving work to a son prosecutors portrayed as an underachieving only child whose sense of entitlement knew no bounds.

The government said at the time that the businesses provided the younger Skelos with about $300,000 and other benefits.

Dean Skelos was sentenced to five years in prison, and his son was given six-and-a-half years.

Since 2000, more than 30 New York state lawmakers have left office over allegations of criminal or ethical violations, and more than a dozen have been convicted of those charges.

Fox News' Brooke Singman and The Associated Press contributed to this report.