The Supreme Court’s decision to uphold the most significant achievement of President Barack Obama’s first term delivers a major boost to his legacy and political fortunes. It comes with a price, however: the risk of galvanizing conservative critics who rose up in the aftermath of the law’s passage, delivering the first tea party lawmakers to Congress.

The Supreme Court’s decision to uphold the most significant achievement of President Barack Obama’s first term delivers a major boost to his legacy and political fortunes. It comes with a price, however: the risk of galvanizing conservative critics who rose up in the aftermath of the law’s passage, delivering the first tea party lawmakers to Congress.

Obama was careful not to gloat Thursday as he hailed the ruling from the East Room of the White House – the same room he used for a triumphant bill signing ceremony in March 2010. Instead, he extolled what he said are the law’s benefits and cautioned against rehashing the fight over health care.

“What we won’t do – what the country can’t afford to do – is refight the political battles of two years ago, or go back to the way things were,” he said.

His remarks came minutes after presumptive Republican presidential nominee Mitt Romney vowed to repeal the health care law, declaring, “If we want to get rid of Obamacare, we’re going to have to replace President Obama.”

Republicans say they expect the ruling to energize their ground troops to repeal the law at the ballot box in November. By early afternoon, Romney’s campaign said it had raised more than $1 million off the ruling and Republicans were honing a new line of attack, seizing on Chief Justice John Roberts Jr.’s contention that the requirement that individuals pay a financial penalty for not obtaining health insurance “may reasonably be characterized as a tax.”

Florida Republican Sen. Marco Rubio took to the Senate floor to envision a world in which the Internal Revenue Service would "chase you around" for payment. “Guess who you have to prove to that you have insurance? Your neighborhood, friendly IRS,” Rubio said.

Senior White House officials disputed the Republican charges, saying the penalty would only apply to people who could afford health insurance but chose not to buy it. They said estimates show that 1 percent or less of the public would qualify. And they contend that the law will result in a tax credit for most middle-class Americans to help them purchase insurance.

The politics are complicated for Romney, who was criticized by his fellow Republicans during the contentious primary campaign for championing legislation as governor of Massachusetts that the White House says served as a model for Obama’s legislation.

Obama campaign officials charged Romney with looking to “run away” from the law, and Obama himself noted that the requirement that individuals carry insurance once had support from Republicans, “including the current Republican nominee for President.”

Polls suggest a public divided on the health care law, with Republican opposition more fierce than Democratic support. Conservatives view the law as a massive and costly expansion of government and emblematic of everything they despise about Obama.

“Winners celebrate and losers mobilize,” said George Edwards, a presidential scholar at Texas A&M University. “This puts health care back in the center of the debate where it hasn’t been since it passed and that’s not necessarily good for him.”

But the ruling is a clear boost to Obama’s decision to pursue the controversial health care law, even against the counsel of some of his closest advisers. It buoys his base and gives Democrats hope that they can better sell the law’s benefits to independent voters, hoping it gains popularity much as Social Security and Medicare did generations ago.

“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’ll be better off because we had the courage to pass this law and keep moving forward,” Obama said.

He and senior administration officials cautioned that Republicans could overplay their hand by pushing for repeal and a return to the fractious health care debates of 2009 that took a toll on congressional job approval.

Perhaps acknowledging the precarious approval rating the health care law carries, White House officials said they didn’t expect Obama, who has not made health care a central theme in his stump speeches, to change course. They said his focus would be the economy.

“Americans don’t like the current health law, but they don’t like the current health care system either,” said Ilisa Halpern Paul, managing government relations director at Drinker Biddle & Reath, a law and lobbying firm. “The economy and jobs are the No. 1 issue.”

Republican National Committee Political Director Rick Wiley argued in a memo Thursday that the ruling hurts Obama in November because polls suggest more Americans want the law repealed.

Wiley said 52 percent of Americans in the June 20-24 ABC News/Washington Post poll had an “unfavorable impression” of the law dubbed “Obamacare” and that just 22 percent in a June 20-24 NBC News/Wall Street Journal poll said they would be “disappointed” if the law were found unconstitutional.

Still, pollster Peter Brown said that politics is a zero-sum game and that the ruling was a win for Obama because it preserves his signature accomplishment.

The ruling also broke a month-long string of bad news for the White House, which began with a worse-than-expected May jobs report that sent financial markets into a tailspin and raised questions about the strength of the economic recovery. Democrats also lost a recall election in Wisconsin and Obama’s attorney general on Thursday became the first U.S. attorney general to be found in contempt of Congress.

“You can hear the sigh of relief at the White House,” said Brown, assistant director of the Quinnipiac University Polling Institute, which polls in battleground states including Florida.

Indeed, there were celebratory hugs. Senior White House officials said Obama – who was watching TV screens that showed erroneous cable TV reports saying the court had struck down the law – hugged White House Counsel Kathryn Ruemmler as she delivered the news, flashing the chief executive two thumbs up as he stood just outside the Oval Office.

His first phone call after the news? A congratulatory call to Solicitor General Donald Verrilli, whose performance in oral arguments before the high court had been roundly mocked by analysts.