WASHINGTON -- Republican and Democratic senators joined in announcing a plan Tuesday aimed at stabilizing America's health insurance markets in the wake of President Trump's order to terminate "Obamacare" subsidies. The president, at first, spoke approvingly of the deal, but as conservatives rebelled, the White House insisted Mr. Trump actually opposed the plan as a bailout of insurance companies.

The agreement followed weeks of negotiations between Republican Sen. Lamar Alexander of Tennessee and Democratic Sen. Patty Murray of Washington that sought to address health insurance markets that have been in limbo following GOP failures to repeal and replace the Affordable Care Act. The talks took on added urgency when Mr. Trump announced last week that he would end monthly "cost sharing reduction" payments the government makes to help insurance companies reduce costs for lower-income people.

Without that money, premiums for some people buying individual health plans would spike, and some insurers would flee the markets, industry officials warn.

Get Breaking News Delivered to Your Inbox

The Alexander-Murray deal would continue the insurer payments for two years, while establishing new flexibility for states under former President Obama's law.

"This would allow the Senate to continue its debate about the long term of health care, but over the next two years I think Americans won't have to worry about the possibility of being able to buy insurance in counties where they live," Alexander said in announcing the deal after a closed-door lunch where he presented it to GOP senators.

"This agreement avoids chaos. I don't know a Republican or Democrat who benefits from chaos," he said.

Alexander said the president had encouraged his efforts in phone calls over the past two weeks. And at the White House, Mr. Trump responded positively, expressing optimism that Republicans would ultimately succeed in repealing Obamacare, but until then, "For a period of one year, two years, we will have a very good solution."

"It is a short-term solution so that we don't have this very dangerous little period, including a dangerous period for insurance companies, by the way," he said during a Rose Garden press conference.

Hours later, at an appearance in front of a conservative Washington think tank, Mr. Trump said he was pleased Democrats had "finally responded to my call for them to take responsibility for their Obamacare disaster" and were working "with Republicans to provide much-needed relief to the American people."

But, he added, "While I commend the bipartisan work done by Senators Alexander and Murray - and I do commend it - I continue to believe Congress must find a solution to the Obamacare mess instead of providing bailouts to insurance companies."

The White House later highlighted that passage to reporters, and a White House official said the line was intended to communicate that, while the president was supportive of Alexander's efforts to seek a bipartisan solution, he opposes the Alexander-Murray plan. The official spoke on condition of anonymity to discuss internal deliberations.

Indeed, White House officials had said they would want more in exchange than the additional state flexibility offered in the Alexander-Murray agreement.

Just minutes before Alexander announced the deal, White House legislative director Marc Short emerged from a Senate GOP lunch saying that "a starting point" in exchange for restoring the cost-sharing payments "is eliminating the individual mandate and employer mandate" - the central pillars of Obamacare.

Initially as president, Mr. Trump continued making the payments though resisting, but he declared last week he would pull the plug. The payments, which cost around $7 billion this year, lower expenses like co-payments and deductibles for more than 6 million people. But discontinuing them would actually cost the government more money under Obamacare's complicated structure, because some people facing higher premiums would end up getting bigger tax subsidies to help pay for them.

The Alexander-Murray deal does include a host of provisions allowing states faster and easier access to waivers that would allow them to shape their own marketplace plans under Obamacare. It also would provide for a new low-cost catastrophic coverage insurance option for all consumers.

Reaction from the GOP was decidedly mixed. For many conservatives it's practically unthinkable to sign off on federal payments that would arguably prop up a law they've been vowing for seven years to destroy.

Rep. Mark Walker of North Carolina, chairman of the conservative Republican Study Committee in the House, quickly denounced the deal over Twitter: "The GOP should focus on repealing & replacing Obamacare, not trying to save it. This bailout is unacceptable."

Freedom Caucus Chairman Rep. Mark Meadows, who's been at work on a proposal of his own, was slightly more positive, calling the Alexander-Murray bill "a good start" but saying much more work needed to be done.

GOP leaders in the House and Senate have also been cool to the Alexander-Murray negotiations, the more so since after their failures on Obamacare they are eager to turn their full attention to tax overhaul legislation.

Senate Majority Leader Mitch McConnell was noncommittal, telling reporters, "We haven't had a chance to think about the way forward yet." Aides to House Speaker Paul Ryan, R-Wis., did not provide a statement from him.

Alexander said he and allies including Sen. Mike Rounds, R-S.D., would spend the next several days trying to build up support with the goal of formally introducing legislation later this week. If the legislation does pass, it would almost certainly be as part of a larger package including must-pass spending or disaster relief bills and that might not be until the end of the year.

Murray lauded the effort, saying, "When Republicans and Democrats take the time ... we can truly get things done" for the American people.

Even more than other aspects of the law, the cost-sharing payments have been in dispute ever since the Affordable Care Act became law. House Republicans sued in 2014 to block the payments, arguing they were illegal because Congress, which has power over government spending under the Constitution, had never specifically authorized them. The Obama administration tried unsuccessfully to get the GOP lawsuit dismissed, but the Republicans won favorable rulings from lower-court judges, putting the payments in legal jeopardy even before Mr. Trump won the White House.