WASHINGTON (AP) - President Barack Obama cast the Supreme Court's election-year vindication of his sweeping federal health care law as a victory for the American people. His Republican rival Mitt Romney vowed to repeal it on his first day in office if he wins the November election.
The high court's ruling Thursday to uphold the overhaul put an end to what had been one of the biggest unknowns in the presidential race.
Obama, speaking from the same spot in the White House where he signed the health care bill into law more than two years ago, sought to tamp down the political implications of the court's ruling. The decision, he said, was about upholding the fundamental principle that no one in America should fall into financial ruin because of illness.
"Whatever the politics, today's decision was a victory for people all over this country whose lives will be more secure because of this law and the Supreme Court's decision to uphold it," he said.
Romney, who spoke before the president, doubled-down on his campaign pledge to repeal the law and cast his candidacy as the next best hope for the millions of Americans who oppose it.
"If we want to get rid of Obamacare, we're going to have to replace President Obama," Romney said from a rooftop in Washington overlooking the U.S. Capitol.
With just over four months until the nation votes, both Obama and Romney will campaign on the high court ruling and use it to raise money for their campaigns.
The Romney campaign said it had collected more than $300,000 in online donations in the hours after the court announced, in a 5-4 decision, that it was upholding the central requirement of the health care law: that most individuals must buy health insurance or pay a penalty.
Obama said that mandate was essential to making the nation's health insurance system workable and affordable.
"That's why even though I knew it wouldn't be politically popular, and resisted the idea when I ran for this office, we ultimately included a provision in the Affordable Care Act that people who can afford to buy health insurance should take the responsibility to do so," he said. "In fact, this idea has enjoyed support from members of both parties, including the current Republican nominee for president."
Romney, as governor of Massachusetts, signed a health care law on which Obama modeled the federal law.
The decision means the historic overhaul will continue to go into effect over the next several years, affecting the way people receive and pay for personal medical care. The ruling also handed Obama a campaign-season victory in rejecting arguments that Congress went too far in requiring most Americans to have health insurance.
The Obama and Romney campaigns have spent months quietly preparing how they would respond to the ruling.
While the White House publically expressed confidence that the overhaul would be upheld, Obama aides feared the political ramifications for the president if the law were to be overturned.
Some Romney aides believe the court's decision could energize Republican voters and prove to be politically positive for the presumptive GOP nominee.
The court's ruling will have a far-reaching impact on the nation's health care system. About 30 million of the 50 million uninsured Americans would get coverage in 2014 when a big expansion begins.
Polling suggests that most Americans oppose the law, but an overwhelming majority want Congress and the president to find a new remedy if were struck down.
House Republicans have pledged to hold quick votes to repeal the law, though those efforts were certain to be blocked by the Democratic-controlled Senate.
Romney said Thursday that he would replace the health care law if elected. He outlined broad goals for a substitute but did not say specifically what policies he would advocate. Romney said he wants people to be able to keep their current health insurance and ensure all Americans have access to affordable insurance. He also said he wants to allow people who maintain continuous health insurance coverage to be able to stay insured even if they change plans and have a pre-existing medical condition.
The court's announcement was followed almost immediately by a barrage of advertisements and fundraising appeals from Democrats and Republicans all trying to cast the decision in the most advantageous light for their candidates.
Obama's campaign began trying to raise money off the ruling even before it was announced. In a Thursday morning fundraising email with the subject line "Today's Decision," Obama campaign manager Jim Messina told supporters "no matter what, today is an important day to have Barack Obama's back."
Outside groups also are ready to unleash a flood of advertising, including a 12-state, $9 million ad buy from the conservative political action group Americans for Prosperity.
AP White House Correspondent Ben Feller and Associated Press writer Kasie Hunt contributed to this report.