“Obamacare is fundamentally broken, increasing health-care costs for millions of Americans,” House Speaker John A. Boehner (R-Ohio) said Thursday after the Supreme Court’s ruling. (Reuters)

Rep. Dave Brat (R-Va.) stood just off the House floor Thursday, minutes after the Supreme Court had rejected the latest challenge to the Affordable Care Act, and gathered his thoughts.

“Just a shocker,” he said, echoing the reaction of many fellow conservative lawmakers who believed that the case decided Thursday would finally unravel the law they have long campaigned to repeal. “How the brightest legal minds could come to that conclusion is beyond me.”

Capitol Hill Republicans who had spent months preparing for a favorable ruling, drafting legislation and echoing finely crafted messages, reacted to Thursday’s decision with dismay, but also new resolve to pass an Obamacare alternative.

“Now it’s back on us,” Rep. Tim Huelskamp (R-Kan.) said.

But that resolve was tempered by the fact that any changes to the health-care law passed in the next 19 months would almost certainly be swiftly vetoed by Obama. And Republicans are far from united on how exactly to draw up a plan to replace Obamacare that would bring together their fractious caucus.

Huelskamp said he hoped Republican leaders would seek to use special budget rules, known as reconciliation, to overcome Democratic opposition and send a bill repealing and replacing the health law to Obama.

“We have never put anything on his desk,” he said. “And we’ve never passed through this body, even had a debate, on what do we replace it with. It’s hard to beat something with nothing, in politics or anywhere else.”

But House Speaker John A. Boehner (R-Ohio) declined to address Thursday how congressional Republicans would respond to the latest ruling upholding the health law.

At his weekly press briefing, an hour after the ruling was announced, he ducked questions about using budget reconciliation to pass a repeal of the law and declined to say whether Republicans would draft a health law alternative.

Boehner told reporters that his committee chairmen have been previously focused on what to do if the justices ruled their way. “Now it’s time to refocus our efforts,” he said.

Supporters of the Affordable Care Act cheered the Supreme Court’s 6-3 decision to uphold subsidies for consumers who rely on the federal government exchange. (Jorge Ribas/The Washington Post)

Sen. John Barrasso (R-Wyo.), an orthopedist who has served as the health-care point man for Senate Republicans, named one possible legislative proposal to replace the law — a plan by Sens. Orrin G. Hatch (R-Utah) and Richard Burr (R-N.C.) that so far hasn’t been given serious consideration.

But when he was pressed on whether Republicans actually plan to consider repeal legislation, Barrasso cited politics: “We know we do not have a willing partner in the White House. We know that the president would veto anything that would pass, and as a result we need someone new in the White House who’s a willing partner to actually help get people the care they need from a doctor they choose at lower cost.”

Asked whether that meant Republicans won’t make a serious attempt to repeal the law until 2017, when Obama’s successor is inaugurated, Barrasso repeated his comment about the lack of a “willing partner” in the White House.

“We’re going to do everything we can to repeal and replace it,” he added.

Rep. Tom Cole (R-Okla.), a senior GOP member who is close to Boehner, said using budget reconciliation to repeal the entire law would not be the best tool to use. “We ought to put something on the president’s desk that we have a chance that he might sign,” he said.

That, Cole said, could include tweaks to the law that the president has supported in the past, like means-testing for Medicare. Other Republicans mentioned targeting unpopular revenue provisions, including taxes on medical devices and on the most generous health plans, that Obama might be compelled to support.

Key Republicans in the House and Senate have been in talks for months about drafting an “off ramp” from the Affordable Care Act, one predicated on a Supreme Court ruling invalidating federal subsidies for 6 million Americans. That plans revolved around offering temporary assistance to those enrollees while ending some of the most controversial aspects of the legislation — such as the individual mandate requiring taxpayers to enroll in a health plan or endure steep tax penalties.

But even those plans were complicated by opposition from conservative hard-liners — such as Sen. Ted Cruz (R-Tex.), a presidential candidate — to any extension of the federal subsidies.

At least a few House conservatives acknowledged that the Supreme Court ruling makes it more likely that Obamacare will survive in its current form.

Rep. Matt Salmon (R-Ariz.) pledged to pursue “any and all opportunities to try to dismantle it.” But the King v. Burwell decision, he said, “does make it harder.”

“I had hoped this would be a golden opportunity to try to replace that law with something that actually helps most Americans,” Salmon said. “Not going to happen, so I’m very disappointed.”

Cole said reversing course would be difficult unless and until Republicans win not only the presidency but the kind of congressional supermajority Democrats enjoyed in the first years of Obama’s term.

“It is much more difficult to undo politically than it was to put in place,” he said. “It was a very unique moment, and very seldom does either party or any president get the kind of power he had in 2009 and 2010.”

Democrats, meanwhile, expressed a mix of relief and joy. And several bluntly told Republicans to move on.

“I think they should get real and forget about Obamacare,” said Senate Minority Leader Harry M. Reid (D-Nev.).

Rep. Gerald E. Connolly (D-Va.) suggested that Republicans were as relieved as Democrats about the ruling.

“They did not want to clean up after the loss of subsidies,” he said. “I mean, there were beads of sweat breaking out on their foreheads about that. So they’re delighted that Roberts got them off the hook.”

And House Minority Whip Steny H. Hoyer (D-Md.) suggested that efforts to undo the law will only get more difficult. “The public continues to believe this is a useful law,” he said. “I think the law is going to have growing public support every year of its existence.”

Paul Kane and Ed O’Keefe contributed to this report.