WASHINGTON (AP) — The Supreme Court on Thursday ruled for a onetime top aide to ex-Democratic Gov. Andrew Cuomo of New York. Both liberal and conservative justices were unanimous in saying there were problems with the bribery conviction of Joseph Percoco.

There were two cases before the court. Besides Percoco, SCOTUS also sided with others convicted of corruption related to the economic development project known as the “Buffalo Billion.”

That project was intended to revitalize parts of Buffalo and other areas of upstate New York. But the project was a multiyear black cloud over the Cuomo administration, frequently cited by critics as proof that Cuomo failed to address chronic corruption in state government, even within his own administration. Cuomo resigned in 2021 amid sexual harassment allegations.

The justices ruled for Percoco—a former aide so close to Cuomo that he was considered like a brother—who was convicted of accepting money from companies seeking to influence the governor in the “Buffalo Billion.” He was ultimately sentenced to six years in prison, a conviction upheld on appeal. The case also involved Syracuse real estate executive Steven Aiello, who paid Percoco for his assistance.

But the Supreme Court, in an opinion by Justice Samuel Alito, said the jury in Percoco’s case was given improper instructions when it found him guilty of a wire fraud conspiracy count. Percoco was convicted “based on instructions that required the jury to determine whether he had a ‘special relationship’ with the government and had ‘dominated and controlled’ government business,” Alito wrote. “We conclude that this is not the proper test.”

In a statement, Percoco’s lawyer, Yaakov Roth, said his client’s prosecution was “an abuse of the federal fraud statutes.” He added: “We are gratified that the court agreed with our position that he was not a public official during the relevant time period, and so he did not violate federal law by acting on behalf of private clients.”

In a footnote, Alito added, “To the extent this is a belated argument that Percoco’s leaving office was to some degree a sham, we express no view on the viability of this alternative theory of conviction in this case on the evidence presented.”

Roth said a lower court will have to determine whether his client’s two remaining convictions can survive after the Supreme Court’s ruling. But Percoco has finished serving his sentence, so the question is just whether the remaining convictions will stay on his record.

In the second case, which also involved Aiello, the court ruled for him and for developers Louis Ciminelli and Joseph Gerardi and Alain Kaloyeros, formerly one of Cuomo’s top economic development advisers. The court in an opinion by Justice Clarence Thomas said that the basis for their fraud convictions was faulty. The group’s prison terms had been put on hold while their case was appealed and the decision makes it more likely that this is the end of the case.

The cases are the latest in a line stretching back years that criticize federal prosecutors for overreaching in public corruption cases against state officials, local officials, and people doing business with the government. In 2020, the high court threw out the convictions of political allies of former Gov. Chris Christie, R-N.J., over the “Bridgegate” scandal that involved four days of traffic jams on the George Washington Bridge. In 2016, the Supreme Court threw out the bribery conviction of former Gov. Bob McDonnell, R-Va.