Oklahoma was the first state to challenge Obamacare in the courts for what is widely considered an unlawful rewrite of the Affordable Care Act by the IRS. “We believe that our position is strong on the merits. We believe that the IRS is acting clearly inconsistent with the statute, that they don’t have the authority that they say that they have,” Oklahoma Attorney General Scott Pruitt told me last year.

Today, U.S. District Judge Ronald White in the Eastern District of Oklahoma agreed with Pruitt, who has been a national role model for attorneys general when it comes to defending states’ rights against federal overreach on a number of fronts, including an environmental fight against the EPA’s regional haze rule. Oklahoma’s lawsuit in that case is on appeal in the 10th U.S. Circuit Court of Appeals.

Pruitt hailed Tuesday’s Obamacare victory, the latest cause for optimism among opponents of  the Affordable Care Act. It is the most recent successful legal challenge that most observers believe ultimately will be settled by the U.S. Supreme Court.

The IRS rule that Oklahoma challenged in September 2012 resulted in billions of dollars in illegal subsidies being paid out, even though Congress never authorized such payments in the law as it was enacted.

“Today’s ruling is a consequential victory for the rule of law. The administration and its bureaucrats in the IRS handed out billions in illegal tax credits and subsidies and vastly expanded the reach of the health care law because they didn’t like the way Congress wrote the Affordable Care Act,” Pruitt said in a written release.

“That’s not how our system of government works,” Pruitt said. “The Obama administration created this problem, and rather than having an agency like the IRS rewrite a law it didn’t like, the administration should have done the right thing and worked with Congress to amend the law. Oklahoma was the first to challenge the administration’s actions, and today’s ruling vindicates what we recognized early on, and that is the administration can’t rewrite the Affordable Care Act by executive fiat.”

Oklahoma argues in its lawsuit that the IRS did not have jurisdiction to arbitrarily rewrite the law so that states like Oklahoma without a state-based health care exchange could issue tax subsidies and assess “large employer” penalties.

The challenge, as others, relies heavily on plain language arguments. Both parts of the new IRS rules are contrary to the actual language of the Affordable Care Act, which plainly says that only states that established state-based health care exchanges could issue tax subsidies or assess tax penalties that fund the subsidies.

The ruling can be appealed by the Department of Justice to the 10th Circuit Court of Appeals in Denver.

“Today’s ruling is a huge win for Oklahoma, but it’s just a first step,” Pruitt said.

“Since Oklahoma filed the first lawsuit in 2012, others have followed our lead and made similar claims in other jurisdictions. It’s likely this issue will ultimately be decided by the U.S. Supreme Court,” Pruitt said. “We look forward to making our case and continuing the effort to hold federal agencies accountable to their duty to enforce the laws passed by Congress.”