(Brett Affrunti for The Washington Post)

From the inaugural oath do-over to an unprecedented State of the Union throwdown, relations between President Obama and the conservative members of the Supreme Court have had an unusually cantankerous feel.

If it had been up to Obama, after all, John G. Roberts Jr. would not have been holding the Bible at the president’s swearing-in, and Samuel A. Alito Jr. would still have been in his New Jersey judicial chambers rather than in the second row of the House mouthing “not true” during Obama’s 2010 address to the nation. As a senator, Obama voted against the Supreme Court confirmations of both men.

But these days, the president must hope that grudges are put aside. He will need at least one Republican-appointed justice on the increasingly conservative court to uphold the signature domestic achievement of his presidency: health-care reform. The court’s four liberals, two appointed by Obama, are forecast as reliable votes in favor. But Obama needs at least five.

In six hours of oral argumentsover three days later this month — the most time the court has spent on a case in 45 years — the Obama administration will try to convince the justices that the Constitution grants Congress broad power to regulate interstate commerce and provide for the national interest. Broad enough to require that almost every American purchase health insurance or pay a penalty.

Roberts, who appears less dedicated to federalism than was his predecessor and mentor, William H. Rehnquist, may be “gettable” on such a question. Justice Anthony M. Kennedy, the usual go-to conservative for liberals, is a realistic possibility. Even Justice Antonin Scalia, the court’s most irascible conservative, might be lured aboard. Alito’s past votes make him more of a mystery.

The court’s liberals — Justices Ruth Bader Ginsburg, Stephen G. Breyer, Sonia Sotomayor and Elena Kagan — are solid on the question of Congress’s broad authority. On the other side, Justice Clarence Thomas has spent his 20 years on the court as a voice for the view that the Constitution mandates a far more limited role for the federal government.

“I think the rest are more or less perceived as being in play,” said Erwin Chemerinsky, the liberal dean of the University of California at Irvine Law School.

Walter Dellinger, a former acting solicitor general and one of the health-care law’s most ardent constitutional cheerleaders, has long predicted that the vote upholding the legislation will be lopsided and that Roberts will be in the majority to write the opinion. (When on the prevailing side, the chief justice writes the opinion or chooses the colleague who gets the job.)

“The reason I think Chief Justice Roberts will write the opinion is because I think he will want to write a narrow opinion,” Dellinger said. It would recognize that there are limits on Congress’s powers, he said, but that the Constitution’s commerce clause is fully met in a law that deals with the “intimately intertwined” issues of health care, insurance and interstate markets.

There is an intangible issue at play as well. Roberts is in a peculiar spot with Obama. When one or both men fumbled the president’s oath of office, it required an embarrassing reenactment. Later, Roberts said it was “very troubling” that Obama criticized the court’s Citizens United v. Federal Election Commission ruling in his 2010 State of the Union address while the justices sat before him.

Roberts is protective of the court’s reputation, however, and sensitive to the perception that its decisions are politicized. A 5 to 4 ruling against the law that put the Republican-appointed justices in the majority and those named by Democrats on the losing side would reinforce the court’s partisan and ideological divide.

A reality check: Dellinger, and others who think the court will uphold the Patient Protection and Affordable Care Act, thought the constitutional challenges to the law were folly that the courts would easily reject.

Instead, as the challenges have proceeded in the lower courts, federal judges have split evenly on whether Congress exceeded its power. At the appellate level, two courts have upheld the law, one said it was unconstitutional, and another said a challenge is premature until the individual mandate — the provision requiring people to buy insurance — actually takes effect in 2014.

Ilya Shapiro, a Supreme Court scholar at the libertarian Cato Institute, said he thinks the chances are greater that the court will vote 5 to 4 to strike only part of the law, the individual mandate, agreeing with 26 states and private groups that decisions about whether to buy health insurance cannot be regulated.

“What Congress is trying to do here is literally unprecedented, as recognized even by the lower courts that ruled for the government,” Cato’s brief to the court says.

It is clear that the Supreme Court has developed a great arc of cases dating back to 1819 recognizing broad powers in the commerce clause, which gives Congress the power to “regulate commerce with foreign nations, and among the several states, and with the Indian tribes.”

Even Scalia has been part of this trend, although he was also in the majority in the two cases in which the court said Congress exceeded its commerce clause powers. But more relevant to the health-care law — and why he might uphold it — is his decision in a 2005 case, Gonzalez v. Raich , which concerned whether the federal government could keep Californians from growing medicinal marijuana for their own use, as state law allowed.

Scalia sided with the government, partly because of the court’s precedents regarding the commerce clause. While in that case Angel Raich’s pot was for her own use, “marijuana that is grown at home and possessed for personal use is never more than an instant from the interstate market,” and thus subject to federal regulation, Scalia wrote in a concurring opinion.

Solicitor General Donald B. Verrilli Jr. adopts Scalia’s language in his brief to the court defending the individual mandate, and in a nod to how important the government considers the precedent, he mentions the Raich decision 10 times. “Because of human susceptibility to disease and accident, we are all potentially never more than an instant” from requiring health care, Verrilli writes — so the government has an interest in making sure that individuals have a way to pay for it.

Roberts was not on the court for any of its commerce clause cases. But he may have provided a clue about his views on federal power in a 2010 decision in United States v. Comstock . In that case, he joined the liberal justices in ruling that sexually dangerous prisoners can be detained after their sentences end.

The decision was seen as an important endorsement of the view that Congress has the power to legislate on issues not specifically delegated to it in the Constitution.

Roberts assigned the case to Breyer and joined his broad opinion in full, while Kennedy and Alito agreed only with the outcome and not Breyer’s broad view of federal power. Scalia and Thomas dissented.

Despite all the attention on Roberts and Scalia, many think Kennedy is the most important conservative for the government to convince. Over the past five terms, he has been in the majority in more than 80 percent of the court’s 5 to 4 decisions, more than any other justice.

Chemerinsky jokes that if he were allowed to stretch the rules in offering a brief to the court on the case, “I would put Justice Kennedy’s photo on the cover.”

Shapiro, too, believes that it is essential for the government to get Kennedy on its side. “Atmospherically, I can’t see that if Kennedy votes to strike it down,” he said, that either Roberts or Scalia would come to the rescue.

Kennedy is mentioned frequently in the government’s brief, especially his concurring opinion in United States v. Lopez: “Congress can regulate in the commercial sphere on the assumption that we have a single market and a unified purpose to build a stable national economy.”

But that’s from a case in which the court ruled that a federal law exceeded the commerce clause’s authority.

Kennedy is also known as a defender of state sovereignty. “By denying any one government complete jurisdiction over all the concerns of public life, federalism protects the liberty of the individual from arbitrary power,” he wrote last year in Bond v. United States , which concerned federal prosecution in an area generally reserved to the states.

“When government acts in excess of its lawful powers, that liberty is at stake,” he wrote.

Similarly, Scalia’s position in Raich may have been an outlier that had more to do with drug laws than constitutional conscription. He joined Thomas last year when the justices declined to review a lower court’s decision on a federal law that bars violent felons from owning body armor, disagreeing with the denial and writing that it raised questions about the “court’s commitment to proper constitutional limits on Congress’ commerce power.”

And the Comstock decision about dangerous prisoners that Roberts joined spelled out a lengthy test for meeting constitutional muster that the health-care law’s challengers say it cannot meet.

The cases demonstrate the difficulty in applying the court’s past decisions to a law that critics repeatedly say is unprecedented. And while ideology is a powerful predictor of how the court will approach issues — the two pairs of justices most often in sync when voting are George W. Bush appointees Roberts and Alito and Obama nominees Sotomayor and Kagan — it does not control all outcomes.

“Lawyers look to precedents and say, ‘We win,’ ” said Lisa Blatt, a Washington lawyer who argues frequently before the justices. “The court looks at context.”

Verrilli seems to think he has found another way to make the conservative justices comfortable: the opinion of Judge Jeffrey Suttonof the U.S. Court of Appeals for the 6th Circuit, a former Scalia clerk and a conservative well-known to the justices. Sutton’s court was one of two appeals panels that have upheld the health-care law in the dozens of cases challenging it.

Sutton gently questions the wisdom of the law but concludes that it is within Congress’s powers to make such decisions.

This is exactly what the Obama administration would like the Supreme Court to find. And just in case the justices have somehow overlooked that a conservative judge has acceded to Congress’s power, Verrilli’s briefs to the court on the individual mandate are exceedingly helpful.

The government mentions Sutton 21 times.

Robert Barnes covers the Supreme Court for The Washington Post.

Read more from Outlook, friend us on Facebook, and follow us on Twitter.