Former Virginia governor Robert F. McDonnell leaves the federal courthouse in Richmond after his 2014 conviction. (Marvin Joseph/The Washington Post)

Supreme Court justices on Wednesday seemed prepared to overturn the 2014 corruption conviction of former Virginia governor Robert F. McDonnell and perhaps make it harder for prosecutors to bring charges against politicians who provide favors for their benefactors.

Justices on both sides of the ideological divide expressed concern about federal corruption laws that could criminalize what they variously called “routine” or “everyday” actions that politicians perform for campaign contributors or supporters who have provided them with gifts.

“For better or for worse, it puts at risk behavior that is common,” said Justice Stephen G. Breyer, who along with Chief Justice John G. Roberts Jr. suggested that the federal corruption laws are so vague that they might be unconstitutional.

Justices are often bolder in their comments at oral arguments than in the eventual opinions they produce. But it seemed that almost any outcome of Wednesday’s one-hour oral argument would be beneficial for McDonnell and his wife, Maureen.

Former Virginia governor Robert F. McDonnell has been sentenced to two years in prison. Here’s a look at the corruption case against McDonnell, by the numbers. (Julie Percha/The Washington Post)

Besides suggesting the law might be unconstitutional, the justices questioned whether instructions given to the jury that convicted the McDonnells were proper and whether there was sufficient evidence to warrant the convictions.

Near the end of the argument, Justice Elena Kagan wondered whether narrowed charges against McDonnell might form a way to retry him.

The hearing on McDonnell was the court’s last oral argument of the term, so a decision in the case might not come until the court nears the completion of its work at the end of June.

The 2016 presidential campaign has featured an outpouring of protest by voters against “politics as usual.” But the justices had a different aim in mind — drawing a clear line that would keep overzealous prosecutors from converting common gestures of politicians into criminal acts. Roberts, for instance, mentioned a hypothetical example of a governor who goes trout fishing with the head of a company seeking tax incentives to relocate to that governor’s state. Breyer offered the example of an expensive bottle of wine bought at a lunch to thank an official for a courtesy.

The McDonnell case stems from more than $175,000 in loans and gifts that the governor and his family received from Richmond businessman Jonnie R. Williams Sr. Williams, the chief executive of Star Scientific, wanted state universities to perform important clinical tests on a dietary supplement the company had developed.

The gifts were not illegal under Virginia law. But federal prosecutors said they were part of a quid pro quo arrangement; McDonnell’s favors, they said, came in the form of meetings arranged to connect Williams with state officials, a luncheon Williams was allowed to throw at the governor’s mansion to help launch the product, and a guest list Williams was allowed to shape at a mansion reception meant for health-care leaders.

McDonnell’s attorney, Noel J. Francisco, said none of those constituted the “official actions” necessary to trigger the bribery laws.

To meet that standard, he said, an official “must either make a government decision or urge someone else to do so. The line is between access to decision-makers on the one hand and trying to influence those decisions on the other.”

There is no evidence McDonnell tried to influence state officials to conduct the tests Williams wanted, Francisco said.

But even Francisco’s definition did not satisfy Breyer.

“The word ‘influence’ is too broad, because every day of the week politicians write on behalf of constituents letters to different parts of government,” Breyer said. He worried about giving one part of government too much power. “The Department of Justice in the executive branch becomes the ultimate arbiter of how public officials are behaving in America,” he said.

Justice Anthony M. Kennedy expressed similar concerns. When Deputy Solicitor General Michael R. Dreeben, representing the government, said any prosecution requires proving to a jury the public official’s criminal intent and actions, Kennedy was not assuaged.

He said it was not enough for the government to tell public officials, “Don’t worry” because “the jury has to be convinced beyond a reasonable doubt, and that’s tough.”

Roberts recalled that three justices of the court — Kennedy, Clarence Thomas and Antonin Scalia, who died in February — had said in a previous case that one of the corruption laws in the case was unconstitutionally vague.

The majority in that earlier case about the “honest services” law narrowed it to refer to bribery and kickbacks, Roberts said. But he said the questions raised in McDonnell’s case suggested that the court’s halfway action in that previous case might have been “ill-advised.”

Roberts also noted a brief filed on McDonnell’s behalf by former White House counsels to the past five presidents, including President Obama, that said upholding McDonnell’s conviction would “cripple the ability of elected officials to fulfill their role in our representative democracy.”

“Now, I think it’s extraordinary that those people agree on anything,” Roberts concluded.

“It may be extraordinary, Mr. Chief Justice,” Dreeben replied, “but that doesn’t make it correct.”

Dreeben, a veteran government lawyer who was later honored by the court for making his 100th argument there, said there were many safeguards in the laws and told the court that overturning McDonnell’s conviction “would send a terrible message to citizens.”

When Breyer said Dreeben was providing a “recipe” for giving too much power to prosecutors, Dreeben replied that McDonnell was urging a reading of the law that provides “a recipe for corruption.”

Justices Sonia Sotomayor and Ruth Bader Ginsburg voiced some support for the government’s position. Ginsburg told Francisco that under his reading of the law, a government official would be able to say, “You want a meeting, pay me a thousand dollars.”

Francisco replied that other laws would cover such a scenario but agreed that it would not be illegal under the corruption laws unless the official influenced a government decision.

Sotomayor was the justice most inquisitive about the specifics of the McDonnell case.

“What do we do with the evidence in the case that the university individuals who were assessing whether or not to do these studies themselves felt pressured [because of the governor’s involvement]?” she asked.

And Dreeben said McDonnell was being careful about the seemingly small favors he did for Williams only in an attempt to skirt the law.

“The governor is taking every step he can do short of saying to [the University of Virginia], ‘Do the studies,’ which his chief counsel told him would be inappropriate,” Dreeben said.

The only truly bad moment of the argument for Francisco came when he referred to Ginsburg as “Justice O’Connor,” something that used to occur more regularly when Ginsburg and Justice Sandra Day O’Connor were the court’s only women. O’Connor retired in 2006.

“That hasn’t happened in quite some time,” Ginsburg said, laughing.

After the hearing, McDonnell told reporters on the steps of the court that he was grateful for the court accepting the case and for the bipartisan support he has received from public officials who have said the government’s prosecution went too far.

“And I want to give credit to my Lord, Jesus, for his sustaining me and my wife and my family during these last 39 months that have been very, very difficult,” McDonnell said. “And I want to say, as I’ve said for the last 39 months, that never during any time during my 38 years of public service have I ever done anything that would abuse the powers of my office.”

Whatever the court decides in McDonnell’s case, it will have a major impact on his wife.

As an unelected first lady, Maureen McDonnell had no ability to take official actions on her own. She was convicted instead of conspiring with her husband to accept bribes in exchange for his official actions. For that reason, if the court were to find that McDonnell did not agree to take official actions, her conviction would probably be overturned as well.

Even if Robert McDonnell’s conviction is upheld, Maureen McDonnell’s attorneys have argued that hers be overturned for other reasons. Maureen McDonnell was sentenced to one year and one day in prison. Like her husband, a judge ruled that Maureen McDonnell would remain free until her appeal is resolved.

The McDonnells, who separated during their legal troubles and whose fractured marriage was a feature of the trial, left Wednesday’s hearing in the same car.

The former governor’s sister, also named Maureen, was asked by a reporter whether the McDonnells were “friends again.”

“We’re not going to comment on that,” the governor’s sister said.

The case is McDonnell v. United States.

Rosalind Helderman and Laura Vozzella contributed to this report.