The Supreme Court upheld Barack Obama's reforms to extend health insurance to another 32 million Americans in a major victory for the president in the heat of a tight re-election contest.
Obama said the ruling, which has decided how health care will be delivered in the United States for decades to come, went beyond politics and urged a divided country to get behind a law that was in the interests of all.
"Whatever the politics, today's decision was a victory for people all over this country whose lives are more secure because of this law and the Supreme Court's decision to uphold it," he said.
"I'm as confident as ever that when we look back five years from now or 10 years from now, or 20 years from now, we will be better off because we had the courage to pass this law, and keep moving forward."
Republicans, who have slammed the reforms as wasteful, big government overreach that would hike insurance premiums and hurt the quality of care, vowed to keep up the fight against Obama's signature domestic achievement.
"'Obamacare' was bad policy yesterday. It's bad policy today," the Republican challenger in the November presidential election, Mitt Romney, said, as congressional allies scheduled a symbolic repeal vote for July 11.
"What the court did not do on the last day in session, I will do on my first day if elected president of the United States, and that is that I will act to repeal 'Obamacare,'" Romney promised.
Republican House Speaker John Boehner issued a rallying cry to conservatives with little more than five months to go before the November 6 elections, saying: "We don't have to accept 'Obamacare.'"
Obama said an America struggling to emerge from a painful recession, with a ballooning budget deficit and stubbornly high unemployment, could ill afford to refight old political battles.
"The highest court in the land has now spoken," he said. "With today's announcement, it is time for us to move forward to implement and where necessary improve on this law."
The key provision that underpinned the overhaul, an "individual mandate" requiring almost every US citizen from 2014 to take out health insurance or be subject to a fine, was upheld in a tight 5-4 vote.
Chief Justice John Roberts, the conservative-leaning leader of the court often seen as a bete noire by Democrats, was the unlikely hero for liberals as the key swing vote that saw the reforms stand.
Writing the majority opinion, Roberts said the court believed that if the mandate was seen as a tax then it was constitutional for the Congress to impose it on America's 50 individual states.
"It is reasonable to construe what Congress has done as increasing taxes on those who have a certain amount of income, but choose to go without insurance. Such legislation is within Congress' power to tax," he wrote.
Underlining how polarizing the health reforms are, there was a stinging dissent from Justice Anthony Kennedy, who wrote: "In our view, the entire Act before us is invalid in its entirety."
Despite the worst fears of the Obama administration that the court might throw out the whole law, the only restriction was on a provision expanding coverage to 16 million more poor Americans.
The court upheld the clause but ordered the government to withdraw its threat to withhold federal Medicaid funding from states that do not comply.
The ruling offers new ammunition to Republicans trying to fire up the conservative base and get out the vote in November but it was also a huge win for Obama that boosts his claim to be a transformative president.
"It is as big an act as killing Osama bin Laden in terms of giving his presidency a temporary boost," Stephen Ryan, former general counsel of the Senate Committee on Governmental Affairs, told AFP.
Two years after Obama signed into law an act to insure most of the 50 million uninsured Americans and prevent coverage from being refused on the basis of patients' medical histories, its fate lay in the hands of just six men and three women.
There were cheers outside court and across the land from liberals and Democrats, for whom this issue has been a burning crusade for decades.
"We are jumping for joy," said Julie Walters, a 35-year-old recruiter in Novato, California whose three-year-old Violet has a rare genetic condition that causes severe epilepsy.
"It means we can live our life not in fear," Walters, whose daughter could have lost coverage due to her pre-existing condition if the law had been struck down, told AFP.
But "Obamacare" opponents were incensed.
"The entire law must be repealed," said Matt Smith of Catholic Advocate, a group outraged by the law's requirement for organizations to include contraception in their employee health plans.
Although the United States is the world's richest nation, it is the only industrialized democracy that does not provide health care coverage to all its citizens.