Andrew Harnik/ASSOCIATED PRESS Former Virginia Gov. Bob McDonnell speaks outside the Supreme Court on April 27 after the court heard oral arguments on the corruption case against him.

WASHINGTON -- The Supreme Court on Monday gave former Virginia Gov. Bob McDonnell (R) the reprieve of his life -- reversing his multiple convictions for corruption and effectively sparing him from federal prison.

McDonnell had been fighting since last summer for the high court to get involved in his case, and a major stroke of luck came in January, when the justices granted him a rare opportunity to not turn himself in until they issued a final ruling.

When the court finally heard the merits of McDonnell's appeal, he seemed to have gotten lucky yet again, with a clear Supreme Court majority expressing deep skepticism over the way the federal government handled his criminal prosecution -- which included a high-profile trial that convicted him and his wife Maureen for receiving lavish gifts in exchange for favors for a pharmaceutical businessman.

In a unanimous ruling authored by Chief Justice John Roberts, the court noted the many indiscretions that led up to McDonnell's prosecution, while leaving open the possibility for a new trial for the former governor.

"There is no doubt that this case is distasteful; it may be worse than that," Roberts wrote. "But our concern is not with tawdry tales of Ferraris, Rolexes, and ball gowns. It is instead with the broader legal implications of the Government’s boundless interpretation of the federal bribery statute."

At the crux of the case was the question of what kind of behavior by elected officials counts as an "official act" under federal anti-corruption laws, which prohibit quid pro quo corruption -- or the exchange of something of value for government favor. McDonnel, aided by a coalition of legal scholars, former government officials and defense attorneys, had contended that his actions didn't qualify, and urged the justices not to settle for a definition that sweeps too broadly and punishes otherwise innocent everyday political activity.

The Supreme Court on Monday largely agreed, relying on the text of federal law, its own precedents and constitutional principles "to adopt a more bounded" reading of what "official act" means.

"Under that interpretation, setting up a meeting, calling another public official, or hosting an event does not, standing alone, qualify as an 'official act,'" Roberts wrote.

The chief justice explained that something more was required -- specifically, "a decision or action on a question, matter, cause, suit, proceeding or controversy," which in turn "must involve a formal exercise of governmental power" or use one's position to "exert pressure on another official to perform an official act."

Pointing to a brief from former White House attorneys who served under both Republican and Democratic presidents, Roberts also noted that the government's proposed reading would lead to a "breathtaking expansion of public-corruption law" that "would likely chill federal officials’ interactions with the people they serve and thus damage their ability effectively to perform their duties."

Given these and other constitutional concerns, Roberts concluded that the jury that convicted McDonnell wasn't properly instructed and that its determinations should be vacated, leaving it to an appeals court to determine whether the case should be set for a new trial or the charges dismissed altogether.

And in a sort of nod to federal prosecutors -- such as Preet Bharara, who has risen to prominence in recent years for going after top elected officials in New York -- Roberts seemed to alleviate fears that the ruling might be read to give a boon to corrupt politicians.

"A more limited interpretation of the term 'official act' leaves ample room for prosecuting corruption, while comporting with the text of the statute and the precedent of this Court," he wrote.

In a statement, McDonnell thanked God, the court and his legal team for Monday's result, and expressed hope that this legal ordeal will soon be over.

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

Read the court's ruling below.

This story has been updated throughout.