The 4th Circuit Court of Appeals upheld Obamacare against a sweeping challenge to its federal subsidies on Tuesday. A three-judge panel unanimously ruled that the statute permits the federal exchange — and not just state-run exchanges — to provide subsidies.

“[W]e find that the applicable statutory language is ambiguous and subject to multiple interpretations. Applying deference to the IRS’s determination, however, we uphold the rule as a permissible exercise of the agency’s discretion,” Judge Roger Gregory wrote for the court.

The ruling came within hours of a separate ruling by the D.C. Circuit Court of Appeals that the federal exchange was not permitted to provide subsidies, dealing a major blow to the law. The vote there was 2-1. The Obama administration said it intends to seek a full bench ruling which could conceivably reverse the outcome of the D.C. Circuit decision.

In the 4th Circuit decision, Gregory wrote that it’s “clear that widely available tax credits are essential to fulfilling the Act’s primary goals and that Congress was aware of their importance when drafting the bill.” He noted that only 16 state-run Obamacare exchanges are currently in place and that the economic framework for the law would “crumble” without federal exchange subsidies.

“Furthermore, without an exception to the individual mandate, millions more Americans unable to purchase insurance without the credits would be forced to pay a penalty that Congress never envisioned imposing on them,” he wrote. “The IRS Rule avoids both these unforeseen and undesirable consequences and thereby advances the true purpose and means of the Act.”

Gregory was recess-appointed by Bill Clinton and then formally nominated by George W. Bush. His opinion was joined by Obama-appointed Judges Stephanie Thacker and Andre M. Davis.

The 4th Circuit court’s active bench includes 14 members: 5 Republican nominees and 9 Democratic nominees (including Gregory).

This article has been updated.

ACA 4th Circuit Ruling