WASHINGTON (Reuters) - A U.S. court temporarily blocked the Trump administration from delaying or ending an Obama-era rule aimed at preventing oil and gas leaks during production, according to court documents, marking the fourth time either Congress or the courts have upheld the rule’s implementation.

FILE PHOTO - A gas company sign marks a fence near the site of the Aliso Canyon storage field where gas has been leaking in Porter Ranch, California, United States, January 21, 2016. REUTERS/Lucy Nicholson/File Photo

The U.S. District Court for the Northern District of California, in an order filed on Thursday, granted the states of California and New Mexico’s bid for a preliminary injunction and denied the administration’s request to move the trial to another court venue in Wyoming.

Its decision was part of a lawsuit filed by the two western U.S. states against U.S. Interior Secretary Ryan Zinke and the Bureau of Land Management in a case that was combined with another filed by a coalition of 17 groups, including the Sierra Club environmental advocacy organization and several tribal groups.

The rule, finalized in November 2016, took effect in January 2017 and was aimed at reducing leaks of natural gas, or methane, that happen through venting and flaring during oil production on federal land. The Obama administration said that venting of methane cost taxpayers over $330 million a year in lost revenues from natural gas.

In his ruling, U.S. District Judge William Orrick said he granted the request for an injunction given that the bureau’s “reasoning behind the Suspension Rule is untethered to evidence contradicting the reasons for implementing the Waste Prevention Rule,” adding that the plaintiffs were likely to prevail on the merits of their case.

“They have shown irreparable injury caused by the waste of publicly owned natural gas, increased air pollution and associated health impacts, and exacerbated climate impacts,” the judge wrote in his decision.

Orrick also said the lawsuits addressed the administration’s “alleged failure to justify a different rule,” not the substance of the rule that is part of other legal issues before the U.S. District Court of Wyoming. The Wyoming court has separately denied an injunction to block the rule.

Additionally, an attempt by lawmakers in Congress to invalidate the rule failed to secure enough votes last May. In October, another California court also overturned the Interior Department’s decision to suspend the methane waste rule.

Representatives for the Department of the Interior and the Bureau of Land Management could not be immediately reached for comment.

The Environmental Defense Fund, one of the advocacy groups suing the administration over the issue, said the move leaves current regulations under the Waste Prevention, Production Subject to Royalties, and Resource Conservation Rule in place.

“The protections restored by today’s decision will help to prevent the waste of natural gas, reduce harmful methane, smog-forming and toxic pollution, and ensure communities and tribes have royalty money that can be used to construct roads and schools,” the group’s lead attorney, Peter Zalzal, said.