WASHINGTON — Mitt Romney and other Republicans who oppose the health care law are looking ahead to one remaining avenue of appeal: the ballot box in November.

Taken aback by the Supreme Court ruling on Thursday that upheld the constitutionality of the law, Mr. Romney and Congressional Republicans pledged to intensify their efforts to repeal it, an argument that will be a crucial element of the party’s quest to galvanize conservative activists and win control of the White House and the Senate.

Republicans swiftly sought to turn the court’s reasoning against President Obama, recasting the legislation as a tax increase. Mr. Romney, who as governor of Massachusetts signed a similar health care law, was one of the few in his party who did not join in that argument. Instead, he criticized the ruling and called the federal law a job killer that inserted the government between patients and their doctors.

For Mr. Obama, the Supreme Court victory blunted efforts by his opponents to brand him as a feckless and failed leader who invested too much time trying to overhaul the health care system as the economy foundered.