A federal district judge in Washington, D.C., ruled Thursday the Obama administration had improperly funded a major subsidy of the Affordable Care Act, dealing a surprise blow to President Obama’s signature legislative achievement.

At issue in the case, House of Representatives v. Burwell, is Section 1402 of the ACA, which requires insurance companies in the ACA’s exchanges to reduce co-payments and deductibles in their plans. The reductions effectively shift those costs from the customer to the insurer.

Section 1402 then allows the federal government to provide “periodic and timely” reimbursements to insurers “equal to the value of the reductions,” thereby shifting the costs from the insurer to the federal government itself.

When Congress passed the act, however, it did not explicitly appropriate funds for those reimbursements. The Obama administration implemented it by drawing upon funds appropriated for Section 1401, which subsidizes health insurance for low-income taxpayers through a tax credit.

In its lawsuit, the House argued Section 1402 could not be funded through Section 1401’s tax credit. Obama administration officials countered that context and legislative history justifies their implementation of it, and that it made no logical sense for Congress to draft the provision without implicitly authorizing funds for it. Judge Rosemary Collyer in the U.S. District Court for the District of Columbia sided with the legislators.

“The Affordable Care Act unambiguously appropriates money for Section 1401 premium tax credits but not for Section 1402 reimbursements to insurers,” Collyer wrote in her opinion. “Such an appropriation cannot be inferred. None of Secretaries’ extra-textual arguments—whether based on economics, ‘unintended’ results, or legislative history—is persuasive.”

Government lawyers also tried to draw comparisons with the issue resolved last term by the U.S. Supreme Court in King v. Burwell. In that case, six justices sided with the Obama administration’s contextual interpretation of a key clause instead of its literal meaning. But Collyer rejected the comparison.

“Simply put, the statute could not function if interpreted literally; it had to be saved from itself,” she wrote about the issue in King. “The problem the Secretaries have tried to solve here is very different: it is a failure to appropriate, not a failure in drafting.”

Although the case is technically between the House of Representatives and the secretaries of the Treasury and Health and Human Services, the two adversaries are essentially Republican lawmakers in Congress and President Obama. Former Speaker John Boehner originally filed the lawsuit in November 2014 to challenge the White House’s unilateral decision to delay the employer mandate’s implementation, with the subsidies as a secondary issue.

Collyer stayed her ruling while the Obama administration challenges it in D.C. Circuit Court of Appeals, allowing the reimbursements to continue for now.