In a stunning victory for the Obama administration, the U.S. Supreme Court on June 28 upheld the centerpiece of the nation’s new health care law — the so-called individual mandate to buy insurance — as a constitutional exercise of Congress’ taxing authority.

Chief Justice John Roberts Jr., who wrote the Court’s opinion, secured the majority on the tax issue by joining with his more liberal colleagues — justices Ruth Bader Ginsburg, Stephen Breyer, Sonia Sotomayor and Elena Kagan.

The Court also ruled that the Affordable Care Act’s major expansion of the federal-state Medicaid program unconstitutionally coerced the states. The coercion was in the federal government’s threat to withhold all of its existing Medicaid funds to states that failed to participate. But instead of striking down the program expansion, the court held only that the federal government could not withhold those funds. States now can decide whether to participate in the expansion.

Four justices — Antonin Scalia, Anth­ony Kennedy, Clarence Thomas and Samuel Alito Jr. — would have struck down the entire law.

Roberts opened the morning and final session of the term before a packed courtroom. Outside the building, a line of visitors stretched from the front plaza across the street to the Library of Congress. A large group of supporters and opponents rallied on the sidewalk.

As the solicitor general of the United States and the other lawyers in that office sat at the lawyers’ table directly below the bench, Roberts began his summary of the health care decision by tackling what had been the government’s primary argument in defense of the law: Congress’ authority under the commerce clause.

“As expansive as our cases construing the scope of the commerce power have been, they all have one thing in common: They uniformly describe the power as reaching ‘activity,’ ” he wrote in his opinion. “The individual mandate, however, does not regulate existing commercial activity. It instead compels individuals to become active in commerce by purchasing a product on the ground that their failure to do so affects interstate commerce.”

Roberts and his four conservative colleagues rejected the government’s commerce clause argument, saying it would open a new and potentially vast domain to congressional authority. Roberts also said the mandate could not be upheld under the necessary-and-proper clause, explaining that, even if the mandate were necessary to achieve the insurance reforms in the act, this expansion of federal power was not a proper means for making the reforms effective.

Roberts then turned to the taxing-power argument, writing that if a law has two possible meanings, one of which violates the Constitution, courts should adopt the one that does not. He said the penalty for not purchasing minimum insurance functioned as a tax: It is collected by the Internal Revenue Service; there is no punitive sanction, such as criminal punishment; and it will raise revenue.

“The…requirement that certain individuals pay a financial penalty for not obtaining health insurance may reasonably be characterized as a tax,” Roberts wrote. “Because the Constitution permits such a tax, it is not our role to forbid it, or to pass upon its wisdom or fairness.”

The majority’s reliance on the taxing power was somewhat surprising, because the government as well as numerous legal scholars and commentators across the political spectrum had focused most of their arguments on whether the individual mandate was a valid exercise of Congress’ commerce clause power. The government, however, did argue forcefully in the Supreme Court that the taxing power was another valid basis for the law.

On the Medicaid issue, Roberts wrote that the financial inducement that Congress chose to get states to participate is “a gun to the head.” He said the threatened loss of more than 10 percent of a state’s overall budget is “economic dragooning that leaves the states with no real option but to acquiesce in the Medicaid expansion.”

When Roberts finished his summary, Kennedy read a summary of the joint dissent. The act, he said, exceeds federal power both in mandating the purchase of insurance and in denying nonconsenting states all Medicaid funding. Because those parts are central to the act, he said, it followed that all of the act must fall. Kennedy said the Court had abandoned judicial modesty and engaged in “judicial overreaching.”

Ginsburg wrote separately and also summarized her opinion, saying she would have upheld the mandate on commerce clause grounds and the Medicaid expansion exactly as Congress enacted it. She called Roberts’ commerce clause analysis “a stunning setback” that should not have staying power. And the Medicaid expansion, she said, is funded almost entirely by the federal government, “hardly something that states can complain about.”

“In the end, the Affordable Care Act survives largely unscathed, but the court’s commerce clause and spending clause jurisprudence has been set awry,” said Ginsburg, adding that she expects the setbacks to be “temporary blips, not permanent obstruction.”

Reaction to the decision flew from across the political and ideological spectrum. “Today’s decision validates our claim that a congressional power to compel that all Americans engage in commerce was a constitutional bridge too far,” said Professor Randy Barnett of Georgetown University Law Center, one of the legal architects of the activity/inactivity argument accepted by Roberts. “By rewriting the law to make it a ‘tax,’ the court has now thrown ObamaCare into the political process where the People will decide whether this so-called ‘tax’ will stand.”

His frequent health care sparring partner, Walter Dellinger of O’Melveny & Myers, said the decision was a “modest incursion” on congressional power. “What is breathtaking is how sweeping the restrictions would be if the four justices in the dissent had prevailed. The Court is just one vote away from severe limits on the authority of Congress.”

The justices’ ruling ended — at least for now — a remarkable and riveting period of public focus and debate on not only the health care law, but also on the role of the Supreme Court, the power of Congress vis-à-vis the states, the scope of the Constitution, and the decision’s potential political fallout on the presidential election.

The lead-up to the arguments drew an outpouring of more than 100 amicus briefs from a broad range of ideological, historical, medical, business and civil rights organizations. A battle also ignited over the participation in the case by Thomas and Kagan. Groups on the left sought Thomas’ recusal because his wife had lobbied against passage of the health care law for an organization that she had headed. Conservative groups called for Kagan to step aside because, they charged, she had worked on the government’s case when she served as solicitor general. In the end, nothing came of the recusal movement as both justices took their seats on argument day.

Marcia Coyle can be contacted at mcoyle@alm.com.