U.S. Magistrate Judge Elizabeth Laporte, however, stopped short Wednesday of reinstating the Obama rule.
Laporte noted that the Trump administration revoked the rule, with the revocation taking effect on Sept. 6.
The judge said reinstating the Obama rule for a few days would disrupt the mining industry by requiring it to switch gears to the old rule in a short time.
But Laporte agreed with the plaintiffs — the attorneys general of New Mexico and California — that the Trump administration did not have the authority to delay the rule after it went into effect on Jan. 1, 2017,but could have revoked it altogether.
The U.S. Department of Justice declined to comment.
Watchdog groups long complained that taxpayers were losing hundreds of millions of dollars annually because royalties on resources from public lands were being improperly calculated. They applauded the Obama administration's changes.
Critics said the changes would drive up energy costs and reduce energy investment on federal and Indian lands.
Trump administration Interior Secretary Ryan Zinke said earlier in August that repealing the rule "provides a clean slate to create workable valuation regulations."
The agency remains committed to collecting every dollar due, Zinke said, noting that public lands are assets belonging to taxpayers and Native American tribes.
The lawsuit challenging the delay of the Obama-era rule was brought by California Attorney General Xavier Becerra and New Mexico Attorney General Hector Balderas.
Balderas' office said in a statement the Obama rule would bring more money to New Mexico that would be earmarked for public schools.
"I'm pleased that a federal court agreed with us that Donald Trump broke the law," Balderas said in a statement. "This is a big win for New Mexico's students, families and teachers."