The U.S. Supreme Court on Monday overturned the corruption conviction of former Virginia Gov. Bob McDonnell in a ruling that could result in new trials in New York for former Assembly Speaker Sheldon Silver and former Senate leader Dean Skelos.

McDonnell and his wife were showered with cash and gifts by a businessman who wanted state support for testing a new drug, but the court ruled that what McDonnell did in return — arranging meetings, making calls and hosting events — did not qualify as “official acts” that exposed him to federal anti-corruption laws.

Chief Justice John Roberts said limiting an “official act” to a “formal exercise of governmental power” or pressure on another official to exercise power was needed to insure that federal prosecutors did not use bribery and honest-services fraud cases to criminalize politics.

“In the Government’s view, nearly anything a public official accepts — from a campaign contribution to lunch — counts as a quid; and nearly anything a public official does — from arranging a meeting to inviting a guest to an event — counts as a quo,” Roberts wrote. “But conscientious public officials arrange meetings for constituents, contact other officials on their behalf, and include them in events all the time.”

In anticipation of the ruling, both Silver, convicted of doing favors in return for legal fees, and Skelos, convicted of helping businesses that helped his son, have been allowed to stay out on bail since they were sentenced to prison in May while they appeal.

At federal court trials in Manhattan last year, both men’s alleged “official acts” included a mixture of actual exercises of governmental power — like casting votes and providing funding — and more subtle behavior, like arranging meetings, providing job references and making phone calls.

Their defense lawyers argue that since it’s impossible to know whether the juries relied on actions that fit the new definition or those that don’t, new trials are needed. Roberts also revised the instructions to be given to jurors, which could be a separate ground for the Second Circuit Court of Appeals to order new trials.

While lawyers for Skelos declined to comment Monday, Silver’s attorneys Steve Molo and Joel Cohen said in a statement the McDonnell ruling would be “central” to their appeal.

“The Supreme Court’s unanimous decision today . . . makes clear that the federal government has gone too far in prosecuting state officials for conduct that is part of the everyday functioning of those in elected office,” the lawyers said.

But Manhattan U.S. Attorney Preet Bharara’s office exuded confidence. “The official actions that led to the conviction of Sheldon Silver and Dean Skelos fall squarely within the definition set forth by the Supreme Court today,” spokesman James Margolin said.

Silver was sentenced to 12 years in prison, Skelos to 5 years, and his son Adam — convicted with him — to 6 1⁄2 years. All three are to remain free on bail for at least five weeks after the McDonnell ruling under a timetable for briefs agreed to by both sides.

Experts said however the Silver and Skelos cases come out, the ruling will raise the bar for public corruption prosecutions ranging from pending charges against New Jersey Sen. Bob Menendez to Bharara’s probes of the NYPD, Albany and New York city hall.

“It’s not enough that someone gets an opportunity to make his case,” said Vincent Bonventre, who teaches criminal justice and law at Albany Law School. “The unanimous court defined official act much, much more narrowly than the government wanted.”

Some observers worried the ruling would blunt the efforts of prosecutors like Bharara to clean up government.

“By confirming that a pay-to-play culture is an inherent part of day-to-day politics, the Supreme Court has opened the floodgates for special interest groups to influence politicians,” said Susan Lerner, executive director of Common Cause New York.

But others predicted that over time, prosecutors will adjust. “I don’t expect them to fold up their tent and go home,” said Stanley Brand, a veteran Washington defense lawyer.

“The decision will make it more difficult for prosecutors to make corruption cases,” added Brett Kappel, a Washington lawyer specializing in campaign and ethics law. “But the new hurdles . . . are not insurmountable.”

With Tom Brune