(CNN) A federal judge in California denied a request to force the Trump administration to continue to make cost-sharing subsidy payments aimed at helping lower-income individuals afford health care costs under Obamacare.

The order is a loss for 18 states and the District of Columbia, which had sought a temporary restraining order against the administration. The White House said earlier this month that it would immediately stop funding the cost-sharing subsidies that reimburse insurers for reducing the deductibles and co-pays of lower-income Obamacare enrollees.

Judge Vince Chhabria of the US District Court for the Northern District of California, who was appointed to the bench by President Barack Obama, held oral arguments on the case Monday.

At oral arguments, Chhabria seemed extremely skeptical of the states' claims, questioning whether they could show the "immediate" harm necessary for him to issue nationwide injunction. He also suggested that many of the states had fair warning and anticipated that the Trump administration might pull funding.

That same skepticism was evident in his 29-page opinion on Wednesday replete with stern words for the attorneys general who brought the case.

Why "have all these attorneys general rushed to court seeking an emergency ruling against President Trump?" the judge wondered at one point.

"State regulators have been working for months to prepare for the termination of these payments," he wrote Wednesday. "And although you wouldn't know it from reading the states' papers in this lawsuit, the truth is that most state regulators have devised responses that give millions of lower-income people better health coverage options than they would otherwise have had."

States like California, he said, had structured their 2018 rates in a way that would protect insurers and low-income individuals who received the subsidies.

He dismissed concerns that the Trump administration's actions would confuse people and wondered whether the states should change the focus of their message.

"One last point on the issue of confusion," Chhabria wrote. "If the states are so concerned that people will be scared away from the exchanges by the thought of higher premiums, perhaps they should stop yelling about higher premiums. With open enrollment just days away, perhaps the states should focus instead on communicating the message that they have devised a response to the CSR payment termination that will prevent harm to the large majority of people while in fact allowing millions of lower-income people to get a better deal on health insurance in 2018."

White House ended payments; Trump wants to negotiate

Although the government has been making the payments since January 2014 and nearly 6 million people qualify for the subsidies, Republican critics -- including GOP lawmakers who challenged the payments in court -- say Congress never properly approved the money for those reimbursements.

Trump, for his part, has indicated several times that he hopes to spur congressional negotiations over the future of Obamacare.

"The Democrats ObamaCare is imploding. Massive subsidy payments to their pet insurance companies has stopped. Dems should call me to fix!" he tweeted earlier this month.

In court papers, the states, led by California Attorney General Xavier Becerra, argued that the payments are required and authorized by the Affordable Care Act. They said that the President's decision was "arbitrary and capricious" in violation of the Administrative Procedures Act, a federal law that governs how agencies can establish regulations.

They also argued the administration's decision violates the "Take Care" clause of the Constitution which mandates that the President faithfully execute the law.

"Since taking office, the Trump administration has engaged in a continued and sustained effort to 'explode' the ACA by making it more difficult and expensive for individuals to procure health insurance coverage through the Act's health insurance Exchanges," Becerra wrote.

If the administration halts the payments, insurance companies would be "forced to raise premiums to cover the shortfall, and would strongly reconsider participating in the Exchanges in future years, making future years' market viability uncertain at best.," Becerra wrote.

Democrats in Congress, led by House Minority Leader Nancy Pelosi, filed a brief in support of the state's position, emphasizing they were involved in the enactment of the Affordable Care Act and that Congress did provide the funding for the cost-sharing provisions.

After the ruling came down, Elizabeth Wydra, president of the Constitutional Accountability Center who filed the brief, expressed disappointment.

"As the court continues to weigh the merits of the case, which this preliminary opinion suggests are close and complicated, we hope the correct interpretation of the law will prevail," she said.

Lawyers for the government maintained that Congress never authorized the payments.

"The power of the purse is among the most essential powers of the Legislative Branch," acting Assistant Attorney General Chad A. Readler argued in court papers. "No matter how compelling the rationale, neither the Executive nor the Judiciary has the authority to expend taxpayer dollars, including billions of dollars in annual cost-sharing reduction payments under the Affordable Care Act, if Congress has not appropriated those funds."

Readler also emphasized that in 2016 a federal judge in the District of Columbia agreed that Congress never appropriated the payments in a suit brought by the GOP-led House of Representatives against the Obama administration.

That opinion was put on hold pending appeal, and after the change of administrations, the Trump Justice Department had been contemplating how it wanted to move forward. A status update is due in that case on October 30.

In court briefs, Readler suggested that the California case is simply an attempt by the states to find a more sympathetic judge. He recommended that Chhabria refrain on ruling on the motion for a temporary injunction and instead transfer the case back to the District of Columbia, where the states are already parties to the lawsuit.

"Plaintiffs cannot simultaneously pursue identical claims in two courts," he wrote.

Not only did Chhabria reject the state's petition for an immediate nationwide injunction, but he expressed some skepticism on their overall case.

"On the legal question presented -- whether Congress has appropriated money for the CSR payments -- both sides have reasonable arguments. However, with the important caveats that the Court has only been given a few days to study this complex matter and the states may not have fully developed all arguments, it initially appears the Administration has the stronger legal position," he wrote.

"The administration cannot fix Congress's error, because the Constitution prevents the administration from making payments on its own," he said.

This story has been updated.