WASHINGTON  Senate Republican leaders are seriously considering legislation that would extend health insurance tax credits through the 2016 election even if the Supreme Court invalidates them later this year.

Three top Republicans told Bloomberg Politics on Tuesday they are preparing a legislative response in case their party gets what it is wishing for: A Supreme Court ruling that would eviscerate a central tenet of President Barack Obama's health care law by declaring tax credits on the federal exchange illegal.

While such a ruling would represent a political victory for Republicans who have contended that Obama's signature legislative initiative is an overreach, some party leaders acknowledge that the real-life consequences could make it a Pyrrhic one.

Tennessee Sen. Lamar Alexander, the chairman of the Health, Education, Labor and Pensions Committee, said Senate Republicans were "close to a consensus" that would "not leave 6 (million) or 7 million Americans in the lurch" if they lose their insurance tax credits.

He pointed to a bill proposed by Wisconsin Sen. Ron Johnson, one of the most politically vulnerable Republicans facing re-election in 2016, as a template. The bill would preserve the Obamacare tax subsidies available through the federal exchange, the legality of which are at stake in the case before the Supreme Court, through August 2017. It has 31 Republican cosponsors.

"Senator Johnson has developed a lot of support for his idea," Alexander said in an interview. "And basically it says if you like your health care plan you can keep it. And if you want more freedom you can have it. And so the Republican response is likely to be implementing those ideas."

The Johnson legislation  which Senate Majority Leader Mitch McConnell, R-Ky., and his four top lieutenants have co-sponsored  would also repeal the health care law's individual mandate and employer mandate. It serves as political cover for Johnson as well as the Republican presidential nominee against possible Democratic attacks for helping bring about a decision that abruptly took away subsidies from millions of Americans.

Senate Finance Committee Chairman Orrin Hatch, R-Utah, said there would have to be an "interim period of time" for Congress to consider a full replacement for the health care law if the justices deem the subsidies illegal.

"We're working on that," the Republican senator said. "But you know, who knows how that's going to turn out."

Wyoming Sen. John Barrasso, McConnell's point person on health care, said there was consideration of preserving insurance subsidies "for a period of time  we haven't determined that yet."

"We want to protect the people that are hurt by the law, by the president's illegal action, but we don't want to protect the law itself," he said in an interview. "So the goal is to provide temporary relief for people and then transition them to decisions at the state level."

At issue in the Supreme Court case, King v. Burwell, is whether the text of the Affordable Care Act prohibits the premium tax credits for Americans enrolled through the federal exchange, which serves residents of three-quarters of the states. The Obama administration says the law clearly permits the subsidies, but many Republicans have formally asked the Supreme Court to say the subsidies are invalid.

Sen. Ben Sasse, R-Neb., told Bloomberg Politics that the party must be ready with a "bridge" toward a full-fledged Obamacare replacement if the Supreme Court grants their wish in King.

"Doing nothing would be a terrible idea," he said. "We need to have the 2016 presidential election be about a real alternative to Obamacare."

Even if Senate Republicans coalesce around a plan  a big if  getting House Republicans on the same page won't be easy. Michael Steel, a spokesman for Speaker John Boehner, R-Ohio, said the " three chairmen of our committees of jurisdiction are crafting our response  which will be consistent with full repeal of Obamacare."