A federal judge in California has struck down the Trump administration’s repeal of an Obama-era rule that amended how the government calculates royalties for oil, natural gas and coal produced on public and tribal lands.

The Department of Interior’s (DOI) Office of Natural Resources Revenue (ONRR) finalized the Consolidated Federal Oil & Gas and Federal & Indian Coal Valuation Reform Final Rule, aka the 2017 Valuation Rule in 2016, and it took effect in early 2017. After Trump took office, the DOI repealed the rule in August 2017.

Attorneys general (AG) for California and New Mexico sued, arguing that the administration had violated the Administrative Procedures Act. In a ruling earlier this month, Senior U.S. District Court Judge Saundra Brown Armstrong of the Northern District of California’s Oakland Division agreed.

“The court finds that the ONRR’s conclusory explanation in the final repeal fails to satisfy its obligation to explain the inconsistencies between its prior findings in enacting the valuation rule and its decision to repeal such rule,” Armstrong wrote regarding State of California et al v. DOI et al, No. C17-5948. “The ONRR’s repeal of the valuation rule is therefore arbitrary and capricious.”

California AG Xavier Becerra said the ruling in U.S. District Court for the Northern District of California’s Oakland Division would result in an additional $71 million in royalties.

The ruling is one of several recent defeats in federal court for the Trump administration and its “energy dominance” agenda.

A judge earlier this year ruled that DOI’s Bureau of Land Management (BLM) did an inadequate job of considering the effects of climate change in authorizing lease sales and ordered a temporary halt to drilling on more than 300,000 acres in Wyoming. A Colorado judge this year ruled BLM violated the National Environmental Policy Act when it approved drilling on nearly 20,000 acres in the Piceance Basin. And a judge in Alaska ruled that a Trump executive order to open areas of the Arctic and Atlantic oceans to leasing was “unlawful and invalid.”

Earlier this month, the White House prevailed in the U.S. Court of Appeals for the Tenth Circuit, where a three-judge panel said rulings against the Waste Prevention, Production Subject to Royalties, and Resource Conservation Rule, aka the venting and flaring rule, were moot because the Trump administration has rescinded the rule.