Having peppered the lawyers defending and challenging the law with questions for more than six hours over the three days, the justices withdrew to their chambers to begin up to three months of deliberation expected to yield a decision by late June.
Obama's healthcare overhaul, signed into law two years ago, is his signature domestic policy achievement. It remains a divisive issue among Americans and is likely to be a key issue ahead of the November 6 election in which he seeks a second term.
The justices took up two final issues on the last day of arguments on Wednesday: whether the rest of the law could stand if the centerpiece requirement that most Americans get insurance or face a penalty is struck down; and the validity of expanding the state-federal Medicaid healthcare program for the poor.
After what critics called a poor performance on Tuesday, U.S. Solicitor General Donald Verrilli, arguing for the administration, closed his case with an emotional request that the justices uphold the law. Verrilli cited millions of people with chronic conditions such as heart disease, diabetes, and breast cancer who would get health insurance under the law.
Congress made a judgment in passing the law, Verrilli said. "Maybe they were right, maybe they weren't." But he said the court should respect the policy judgment made by democratically elected lawmakers in their decades-long struggle to help millions of uninsured.
Opinion polls show Americans favor some kind of reform -- the United States pays more on healthcare per person than any other country -- but polls also show the country deeply divided on the particulars of the Obama healthcare program.
Critics of the law say it meddles too far into the lives of individuals and the business of the states. They say that if the federal government can force people to buy health insurance, it would be able to force people to, for example, purchase American-made cars or join health clubs.
Twenty-six of the 50 U.S. states and a small-business trade group challenged the law in court. The lawyer for the states fighting the law, Paul Clement, told the court: "I would respectfully suggest that it's a very funny conception of liberty that forces somebody to purchase an insurance policy whether they want it or not."
As the court spent its last day hearing arguments on the law, the crowd of supporters and protesters outside the high court was smaller and more subdued. Noisy protests dominated the scene earlier in the week.
The decision on whether the wide-ranging law, including the mandate that most Americans buy health insurance by 2014, will likely come down to two key justices -- Chief Justice John Roberts and Anthony Kennedy who often casts the decisive vote.
The court appeared sharply divided along ideological lines, with five Republican-appointed conservatives doubting the law would survive and the four Democratic-appointed liberals offering a strong defense for the statute.
If even one of the conservative justices joins the liberal wing on the court, the law would be upheld. If the conservatives stay united, the law would fall.
The states challenging the law say the rest of Obama's healthcare overhaul must go if the court strikes the insurance requirement. Clement, their lawyer, told the justices that the so-called individual mandate to obtain insurance or face a penalty was "essential to the entire scheme."
That sentiment was shared by conservative Justice Antonin Scalia, who said that if the individual mandate was struck down, the entire law must go. "My approach would be if you take the heart out of the statute, the statute is gone," he said.
Chief Justice Roberts said the court would have difficulty figuring out what Congress really wanted to survive from the law because of horse-trading that went on when lawmakers crafted the legislation. The law was passed when Obama's fellow Democrats controlled both houses of Congress after a contentious fight with Republicans dead set against it.
Roberts also noted that the law had two purposes in its title, "Patient Protection and Affordable Care Act," and said it would be tough if not impossible to discern Congress' intent.
"That's just an inquiry that you can't carry out," he said.
Kennedy voiced concern about possible unintended consequences in the form of huge costs to insurance companies if the mandate -- which would bring millions of healthy young people into the healthcare system and spread out costs -- was invalidated alone.
"We would be exercising the judicial power if one ... provision was stricken and the others remained to impose a risk on insurance companies that Congress had never intended," Kennedy said. "By reason of this court, we would have a new regime that Congress did not provide for, did not consider."
The four liberal justices expressed deep reservations about tossing out the sweeping law that has hundreds of other provisions, some of them already in effect.
Justice Sonia Sotomayor, one of the four and an Obama appointee to the court, asked whether the court should allow Congress to decide what to do next. "What's wrong with leaving it in the hands of people who should be fixing this, not us?"
Liberal justice Ruth Bader Ginsburg went further. She said many parts of the law had not been challenged in court. "Why make Congress redo those?"
Another Obama administration lawyer, Edwin Kneedler, told the court that if the mandate was struck down, only two key provisions would also have to fall, those related to coverage for people's preexisting conditions and limiting costs for those patients with a past medical history.
The justices are expected to meet in private on Friday to discuss the issues heard during the arguments this week and take a preliminary secret vote on how they plan to rule. The justices then will begin drafting their written opinions in the private confines of their chambers.
The justices also reviewed whether Congress violated the Constitution by coercing the states to dramatically expand the state-federal Medicaid healthcare program for the poor, providing coverage for an estimated 17 million Americans.
There did not appear to be a majority supporting the challenge to that expansion but like all of the issues in the case, the court appeared deeply divided along ideological lines.
Ginsburg said that while 26 states oppose the expansion, other states welcome it. Scalia asked the politics of the states for and against the federal healthcare funds, to which Clement acknowledged the Republican-led states were against it and Democratic-led states favored it.
The Supreme Court cases are National Federation of Independent Business v. Sebelius, No. 11-393; U.S. Department of Health and Human Services v. Florida, No. 11-398; and Florida v. Department of Health and Human Services, No. 11-400.
By James Vicini and Joan Biskupic
Last Updated: 2012-03-28 19:22:11 -0400 (Reuters Health)
Copyright © 2012 Reuters Limited. All rights reserved. Republication or redistribution of Reuters content, including by framing or similar means, is expressly prohibited without the prior written consent of Reuters. Reuters shall not be liable for any errors or delays in the content, or for any actions taken in reliance thereon. Reuters and the Reuters sphere logo are registered trademarks and trademarks of the Reuters group of companies around the world.