WASHINGTON — Republicans who have been hoping that the Supreme Court will upend President Obama’s health care law are now confronting an urgent and uncomfortable question: What if they win?

Republicans in Congress would face an enormously complicated challenge to fashion an alternative, and they fear the fallout could lead to election losses if millions of Americans abruptly found themselves without health insurance.

If the court voids a federal rule allowing subsidies in states that use the federal insurance marketplace, many Republicans said, they would support a temporary continuation of subsidies for people with low or moderate incomes.

“Our goal is to protect people, not the law,” said Senator John Barrasso, Republican of Wyoming, who has been charged by his party with devising a possible legislative response to the court decision, which is expected by the end of this month.