WASHINGTON/SAN FRANCISCO (Reuters) - Eighteen U.S. states sued President Donald Trump’s administration on Friday to stop him from scrapping a key component of Obamacare, subsidies to insurers that help millions of low-income people pay medical expenses, even as Trump invited Democratic leaders to negotiate a deal.

One day after his administration announced plans to end the payments next week, Trump said he would dismantle Obamacare “step by step.”

His latest action raised concerns about chaos in insurance markets. The subsidies cost $7 billion this year and were estimated at $10 billion for 2018, according to congressional analysts.

“As far as the subsidies are concerned, I don’t want to make the insurance companies rich,” Trump told reporters at the White House. “They’re making a fortune by getting that kind of money.”

Trump’s action took aim at a critical element of the 2010 law, his Democratic predecessor Barack Obama’s signature domestic policy achievement. Frustrated by the failure of his fellow Republicans who control both houses of Congress to repeal and replace Obamacare, Trump has taken several steps to chip away at it.

Democrats accused Trump of sabotaging the law.

Democratic attorneys general from the 18 states as well as Washington, D.C., filed a lawsuit in federal court in California later on Friday. The states include: California, Connecticut, Delaware, Kentucky, Illinois, Iowa, Maryland, Massachusetts, Minnesota, New Mexico, New York, North Carolina, Oregon, Pennsylvania, Rhode Island, Vermont, Virginia and Washington state.

The states will ask the court to force Trump to make the next payment. Legal experts said the states were likely to face an uphill battle in court.

“His effort to gut these subsidies with no warning or even a plan to contain the fallout is breathtakingly reckless,” New York Attorney General Eric Schneiderman said. “This is an effort simply to blow up the system.”

The new lawsuit would be separate from a case pending before an appeals court in the District of Columbia in which 16 Democratic state attorneys general are defending the legality of the payments.

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 still too high to qualify for certain government assistance.

About 10 million people are enrolled in Obamacare through its online marketplaces, and most receive subsidies. Trump’s action came just weeks before the period starting on Nov. 1 when individuals have to begin enrolling for 2018 insurance coverage through the law’s marketplaces.

The administration will not make the next payment to insurers, scheduled for Wednesday, U.S. Attorney General Jeff Sessions said.

Senate Democratic leader Chuck Schumer expressed optimism about chances for a deal with Republicans to continue the subsidy payments.

“We’re going to have a very good opportunity to get this done in a bipartisan way” during negotiations in December on broad federal spending legislation, “if we can’t get it done sooner,” Schumer told reporters.

Trump offered an invitation for Democratic leaders to come to the White House, while also lashing out at them. “We’ll negotiate some deal that’s good for everybody. But they’re always a bloc vote against everything. They’re like obstructionists,” Trump told reporters.

The Senate failed in both July and September to pass legislation backed by Trump to repeal Obamacare due to opposition by a handful of Republican senators. One of them, Susan Collins, a moderate Republican from Maine who had been contemplating running for governor next year, on Friday said she planned to remain in the Senate and would use her voice in reforming the healthcare system.

Slideshow ( 9 images )

SHARES OF INSURERS, HOSPITALS FALL

Hospitals, doctors, health insurers, state insurance commissioners and patient advocates decried Trump’s move, saying consumers will ultimately pay the price. They called on Congress to appropriate the funds needed to keep up the subsidy payments.

Shares of U.S. hospital companies and health insurers closed down on Friday after the subsidies announcement. Centene Corp CNC.N closed down 3.3 percent and Molina Healthcare MOH.N closed down 3.4 percent. Among hospital shares, Tenet Healthcare THC.N finished 5.1 percent lower and Community Health Systems CYH.N declined 4.0 percent.

The nonpartisan Congressional Budget Office has estimated that erasing the subsidies would increase the federal deficit by $194 billion over the next decade because the government still would be obligated under other parts of Obamacare to help lower-income people pay for insurance premiums.

Slideshow ( 9 images )

Trump, who as a candidate last year promised to roll back the law formally called the Affordable Care Act, received applause for his latest action during an appearance on Friday before a group of conservative voters.

“It’s step by step by step, and that was a very big step yesterday,” Trump said. “And one by one, it’s going to come down, and we’re going to have great healthcare in our country.”

Earlier on Twitter he called Obamacare “a broken mess” that is “imploding,” and referred to the “pet insurance companies” of Democrats.

Republicans for seven years had vowed to get rid of Obamacare, but deep intra-party divisions have scuttled their efforts to get legislation through the Senate, where they hold a slim majority.

Since taking office in January, Trump threatened many times to cut the subsidies. Health insurers that planned to stay in the Obamacare market prepared for the move in many states by submitting two sets of premium rates to regulators: with and without the subsidies.

The National Association of Insurance Commissioners said the change would drive up premium costs for consumers by at least 12 to 15 percent in 2018 and cut more than $1 billion in payments to insurers for 2017.

The White House announced the cut-off just hours after Trump signed an order intended to allow insurers to sell lower-cost, bare-bones policies with limited benefits and consumer protections.

Republicans have called Obamacare an unnecessary government intrusion into the American healthcare system. Democrats have said the law needs some fixes but noted that it had brought insurance to 20 million people.