A federal appeals court has vacated the corruption conviction of former Assembly Speaker Sheldon Silver, citing a recent U.S. Supreme Court ruling that redefined the definition of an “official act.” Using the new definition, the court said the jury might not have convicted Silver, once one of the most powerful political leaders in the state.

The Court of Appeals in Manhattan ordered that the case be remanded to the trial court, leaving the door open for prosecutors to retry Silver on charges that he obtained nearly $4 million in illegal payments in return for taking official actions that benefited others.  Acting U.S. Attorney Joon Kim said Silver would be retried.

“While we are disappointed by the Second Circuit’s decision, we respect it, and look forward to retrying the case,” Kim said in a statement, noting that the appeals court said it found sufficient evidence for a conviction even under the new legal definition.

“Although this decision puts on hold the justice that New Yorkers got upon Silver’s conviction, we look forward to presenting to another jury the evidence of decades-long corruption by one of the most powerful politicians in New York State history,” Kim said. “Although it will be delayed, we do not expect justice to be denied.”

Former U.S. Attorney Preet Bharara, whose office had prosecuted Silver, tweeted, “The evidence was strong. The Supreme Court changed the law. I expect Sheldon Silver to be retried and re-convicted.”

Silver had been sentenced to 12 years in prison, and was forced to give up his Assembly seat. He has been free on bail pending appeal.

In a statement, Silver’s lawyers said, “We are grateful the court saw it our way and reversed the conviction on all counts.”

In their appeal, attorneys for Silver, 73, argued that the U.S. Supreme Court had clarified the definition of official misconduct last year when it vacated the conviction of former Republican Gov. Bob McDonnell of Virginia.

In Silver’s nearly month-long trial in 2015, the jury had been instructed by Manhattan District Court Judge Valarie Caproni that an official misconduct was “any action taken or to be taken under color of official authority.” But Silver’s lawyers argued that the U.S. Supreme Court in the McDonnell case defined official misconduct as “a decision or action on a ‘question, matter, cause, suit, proceeding or controversy’” involving “a formal exercise of governmental power.”

“We further hold that this error was not harmless,” the appeals court ruled, “because it is not clear beyond a reasonable doubt that a rational jury would have reached the same conclusion if properly instructed, as is required by law for the verdict to stand.”

Silver was convicted of abusing his public position by engaging in two quid pro quo schemes in which he performed official acts in return for bribes and kickbacks, and that he put the proceeds of his schemes into private investment vehicles. Silver’s lawyers argued in their appeal that in presenting its case the government had also failed to trace “dirty” funds that were comingled with “clean” funds. But the appeals court rejected that argument.

“We recognize that many would view the facts adduced at Silver’s trial with distaste,” Judge José A. Cabranes wrote for a unanimous three-judge panel. “The question presented to us, however, is not how a jury would likely view the evidence presented by the government. Rather, it is whether it is clear, beyond a reasonable doubt, that a rational jury, properly instructed, would have found Silver guilty.

“Given the teachings of the Supreme Court in McDonnell, and the particular circumstances of this case, we simply cannot reach that conclusion.”

The appeals court’s decision could offer a glimpse into its thinking on the pending appeal of former New York State Senate leader Dean Skelos. He was convicted in 2015 on extortion, bribery and conspiracy charges, and in their appeal Skelos’ lawyers also cited the U.S. Supreme Court’s McDonnell ruling.