A bipartisan deal to stabilize Obamacare by restoring billions of dollars of federal subsidies to health insurers picked up Republican support in the Senate on Thursday despite President Donald Trump’s opposition but still faced an uphill battle.

Republican Senator Lamar Alexander and Democratic Senator Patty Murray formally introduced legislation to shore up the insurance markets created under the 2010 healthcare law by reviving the subsidies, which Trump has discontinued, for two years to help lower-income Americans obtain medical coverage.

The senators announced that the deal now has the support of 12 of the 52 Republicans in the 100-seat Senate, as well as 12 Democrats.

Speaker Ryan's vote is a no

While Alexander predicted in remarks on the Senate floor that the plan “will become law in some fashion before the end of the year,” Senate Majority Leader Mitch McConnell has not committed to bringing it to a vote, and House of Representatives Speaker Paul Ryan is against it.

Lobbyists and congressional aides closely following the matter said the legislation could make it onto the Senate floor tucked inside a bigger “must-pass” bill that Congress needs to act on in December, such as a broad spending measure to prevent a federal government shutdown.

Trump campaigned for the presidency last year promising to get rid of Obamacare, the signature legislative achievement of his Democratic predecessor Barack Obama. But his fellow Republicans who control Congress have failed to repeal and replace the law thanks to deep intra-party divisions.

Obamacare, formally called the Affordable Care Act, extended health insurance to 20 million people but Republicans call it government interference in Americans’ healthcare.

Trump reverses position

Trump initially indicated support for the Alexander-Murray agreement but reversed himself, saying on Wednesday “I can never support bailing out” insurers.

Senator Mike Rounds, one of the bill's Republican co-sponsors, said that if Trump decides he does not support it, “then it will not go forward.” When a reporter noted that Trump does oppose it, Rounds replied, “That was yesterday.”

Without the subsidies, insurance premiums for some of the 10 million Americans who get coverage through Obamacare markets will surge. Noting that some conservative Republicans object to the subsidies, Alexander asked, “What’s conservative about creating chaos so millions can’t buy insurance, or at least failing to deal with the chaos that has been created?”

The bill has broad support among Democrats, but had just seven Republicans on record supporting it only a day earlier.

If passed in December, as opposed to before the Nov. 1 beginning of enrollment for 2018 Obamacare insurance policies, it would be unlikely to affect premiums for next year, meaning its benefits might not be felt until 2019.

Insurers have already decided whether to participate in the Obamacare markets and set higher rates to build in the possibility that the subsidies would vanish.

Insurers say they do not profit from the subsidies, but pass them on directly to consumers to reduce deductibles, co-payments and other out-of-pocket medical expenses for low-income people.

The bill would also give more flexibility for states to offer a wider variety of health insurance plans while maintaining the requirement that sick and healthy people be charged the same rates for coverage.

Senate Republicans nervous

Many Senate Republicans are nervous about the prospect of voting on any healthcare measure — no matter what legislation it may be attached to — that buttresses Obamacare.

Part of the fear, according to one senior Senate Republican aide, is that Trump's former chief White House strategist Steve Bannon is recruiting hard-line conservative primary challengers to run against incumbent Republican senators next year. The aide said incumbents do not want to be forced to cast a controversial vote to stabilize Obamacare, a law reviled by many conservatives.

If all 46 Senate Democrats and two independents back the Alexander-Murray bill as expected, the support of the 12 Republicans means the bill has the 60 votes needed to reach the super-majority required to pass most legislation in the Senate.

No bail out for insurers

Trump on Thursday underscored his concerns about the bill. He urged Alexander and Murray to be “careful with respect to the insurance companies,” which he said are “extremely talented at making money.”

Alexander and Murray both said that their legislation does not bail out insurers. Alexander also noted that House Republicans, in a Obamacare repeal and replace bill they passed in May, also would continue the subsidy payments for two years.

Alexander said Trump has called him four times in recent days on this subject, including a Saturday night call when he was at a restaurant and “my dinner got cold.” He urged the president to support the initiative.