(Adds Senator Collins supporting agreement, additional Trump quotes)
WASHINGTON, Oct 17 (Reuters) - Two U.S. senators on Tuesday announced a bipartisan breakthrough to shore up Obamacare for two years by reviving federal subsidies for health insurers that President Donald Trump planned to scrap, and the president voiced support for the plan.
The agreement worked out by Republican Senator Lamar Alexander and Democratic Senator Patty Murray would meet some Democratic objectives, including a revival of the subsidies for Obamacare and restoring $106 million in funding for a federal program that helps people enroll in insurance plans.
In exchange, Republicans would get 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.
The Trump administration said last week it would stop paying billions of dollars to insurers to help low-income Americans pay medical expenses, part of the Republican president's effort to dismantle Obamacare, former Democratic President Barack Obama's signature healthcare law.
Trump appeared well-placed to make good on his campaign promise to dismantle Obamacare when he took office in January, with Republicans, who pledged for seven years to scrap the law, controlling Congress. But he has been frustrated with their failure to pass legislation to repeal and replace it and is now backing a plan that could keep Obamacare in place until the 2020 presidential campaign starts heating up.
"We are ironing out a few of the last details right now but I am very optimistic that we will be able to make an announcement with all the details very soon," Murray told reporters.
"This takes care of the next two years. After that, we can have a full-fledged debate on where we go long-term on healthcare," Alexander said.
Alexander said he hoped to have "a significant number" of senators from both parties as co-sponsors of the plan.
It is unclear whether the agreement can make it through Congress.
Chuck Schumer, the top Senate Democrat, said the agreement had "broad support" among senators in his party, but it was harder to gauge possible support among Republicans. Moderate Republican Senator Susan Collins, who helped sink earlier Obamacare repeal legislation, voiced support for the new plan, but conservative Republicans might be less welcoming.
Schumer urged Senate Majority Leader Mitch McConnell to bring the plan to a vote on the Senate floor and urged the House of Representatives to take it up then as quickly as possible so Trump can sign it.
Trump said on Tuesday the 2010 law, formally known as the Affordable Care Act, was a "disaster" and "virtually dead." But Trump indicated he could get behind the Alexander-Murray plan.
"It is a short-term solution so that we don't have this very dangerous little period - including dangerous period for insurance companies, by the way. For a period of one year, two years, we will have a very good solution," Trump told a news conference with Greek Prime Minister Alexis Tsipras.
Trump added that once Congress completes work on his proposed tax overhaul, he wants lawmakers to again take up broader legislation that failed in the Senate last month that would divvy up federal healthcare money as block grants to states.
Despite backing the deal, Trump repeated his criticism that the subsidies amounted to a giveaway by the federal government that had enriched insurance companies.
'OBVIOUSLY A GOOD STEP'
Murray is the top Democrat on the Senate Health, Education, Labor and Pensions Committee, and Alexander is its chairman.
She said the two were able to find common ground on the steps aimed at stabilizing the insurance markets created under Obamacare and to "help protect families from premium spikes as a result of the sabotage we have seen from this administration."
The subsidies to private insurers cost the government an estimated $7 billion this year and were forecast at $10 billion for 2018. Trump's move to scuttle them had raised concerns about chaos in insurance markets.
If the subsidies vanish, low-income Americans who obtain insurance through Obamacare online marketplaces where insurers can sell policies would face higher insurance premiums and out-of-pocket medical costs. It would particularly hurt lower-middle-class families whose incomes are too high to qualify for certain government assistance.
Shares of U.S. hospital operators, including Tenet Healthcare Corp and HCA Healthcare Inc, moved higher after news of the deal. Tenet shares closed 5.3 percent higher, while HCA rose 2.2 percent. Shares of some U.S. health insurers also extended their gains on the day, with Anthem Inc finishing up 1.9 percent and Centene Corp gaining 3.2 percent.
Analyst Brian Tanquilut of global investment banking firm Jefferies, who focuses on hospital companies, said that if the deal is passed in Congress, it should stabilize the Obamacare insurance exchanges and improve their viability.
"Hospitals will avoid a potential spike in bad debt and charity care next year," Tanquilut said. "This is obviously a good step. It's bipartisan and guaranteed for two years." (Reporting by Yasmeen Abutaleb and Richard Cowan; Additional reporting by Lewis Krauskopf in New York; Writing by Yasmeen Abutaleb, Caren Bohan and Will Dunham; Editing by Jonathan Oatis and Peter Cooney)