Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

The U.S. Supreme Court on Monday tossed out the bribery conviction of former Virginia Governor Robert McDonnell, who was found guilty of accepting thousands of dollars in cash and gifts.

Former Virginia Gov. Bob McDonnell, right, and his sister, Eileen, left, leave the federal courthouse in Richmond, Va., Monday, Aug. 18, 2014. Bob Brown / Richmond Times-Dispatch via AP

The decision rejected the federal government's view of how broadly federal bribery laws can reach.

The ruling makes it harder for federal prosecutors to bring corruption cases against state and local officials. And it may complicate the government's efforts to try federal office holders for corruption, including Sen. Robert Menendez, a New Jersey Democrat accused of doing political favors in exchange for contributions and other gifts from a Florida eye doctor.

The ruling also spares McDonnell from having to report to prison to serve a two-year sentence. Prosecutors could seek to put McDonnell on trial again but with different jury instructions on the definition of corruption.

In sending the case back, the unanimous opinion cuts the heart out of the government’s case against McDonnell. The ruling narrows the definition of “an official act,” and in so doing would make it very hard for the government to retry the case.

Related: Supreme Court Hears Former Virginia Governor's Bribery Appeal

“Setting up a meeting, hosting an event, or calling an official (or agreeing to do so) merely to talk about a research study or to gather additional information,” does not meet the definition, the court wrote.

The government claimed that when McDonnell performed those kinds of actions, in return for gifts and cash, he was violating the law.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

McDonnell said the ruling made for "a day in which my family and I rejoice and give thanks.

"From the outset, I strongly asserted my innocence before God and under the law. I have not, and would not, betray the sacred trust the people of Virginia bestowed upon me during 22 years in elected office," he said in a written statement.

A jury convicted him in 2014 on a host of federal bribery charges for accepting $175,000 in money and luxury goods from a Virginia businessman who wanted help getting two state universities to conduct research on a diet supplement.

The businessman wrote checks to help McDonnell pay credit card and real estate debts and cover the cost of catering his daughter's wedding. Among the gifts were a Rolex watch, $20,000 worth of designer clothes for McDonnell's wife, Maureen, and the use of a country club, a vacation home, and a Ferrari sports car.

None of those favors were illegal under Virginia law, which had no limit on gifts or loans given to public officials. But McDonnell was charged with violating federal anti-corruption statutes.

Related: Former First Couple of Virginia Puts Hopes in U.S. Supreme Court

McDonnell's defense lawyers maintained that there was no bribery because the governor never actually used the power of the his office to help the businessman — who never got anything in return.

The defense wanted the judge to tell the jurors that they were to decide whether what McDonnell did "was intended to or did in fact influence a specific official decision the government actually makes."

At most, his lawyers said, all he did was set up a few meetings for the businessman but never pressured state officials to help. "Mere ingratiation and access are not corruption," the defense said.

Related: Supreme Court to Hear Corruption Appeal From Former Virginia Governor

But the Justice Department rejected McDonnell's notion that a public official can be prosecuted for accepting money only in return for some formal action or direct pressure exerted on others. The range of official duty includes an office holder's exercise of influence over decisions made by others, the government said.

Justice Department lawyers warned that a ruling for McDonnell could scale back the reach of federal bribery laws.

Monday's ruling is sure to be cited by lawyers for other public officials facing corruption trials.

A federal judge in New York postponed the date on which two former New York state legislators must begin serving their sentences for corruption. Their lawyers said a ruling for McDonnell could affect their appeals.

Federal prosecutors in New York said the ruling should not affect those cases.

"While we are reviewing the McDonnell decision, the official actions that led to the convictions of Sheldon Silver and Dean Skelos fall squarely within the definition set forth by the Supreme Court today,” said James Margolin, a spokesman for the U.S. Attorney's office in Manhattan.

An appeal filed by McDonnell's wife, Maureen, who was also convicted, was on hold pending the Supreme Court's decision in his case.