The Obama administration published the final version of the EPA rule under the authority of the Clean Air Act last year. It would have gone into effect on June 3, 2017, after which oil companies would have had to begin measuring waste methane emissions so they could repair leaks and faulty equipment.

Instead, there was a flurry of legal activity. In March, Donald Trump ordered a review of the rule’s legality in his omnibus executive order on climate change. A month later, the EPA began to undertake it.

In late May, fossil-fuel companies begged the EPA to put the deadline for enforcement off. Pruitt granted their request twice over. First, he delayed the entire rule’s implementation by 90 days. Then, two weeks later, he announced that the rule would lose the force of law for two years. The EPA would fully reconsider the methane rule’s standing under the Clean Air Act, he said.

Thirteen states and six environmental groups immediately sued Pruitt, alleging that many of the fossil-fuel companies’ problems with the rule had already been addressed when the EPA was writing it. They alleged he had no right to put a 90-day stay on the rule’s implementation. It wasn’t that the rule had been illegally written, they alleged—it was just that Pruitt didn’t like it.

A panel of federal judges agreed with them on Monday. Pruitt’s decision was “arbitrary, capricious, [and] in excess of statutory . . . authority,” they said. They struck down the 90-day stay, allowing the EPA methane rule to gain the force of law.

The judges write that the “administrative record”—that is, the body of scientific and legal evidence that Obama’s EPA put together while writing the methane rule—already addressed all the oil and gas firms’ complaints. The rule was sometimes even changed at the urging of the firms themselves, they added.

But the news is not all good for climate advocates. The panel said that the EPA was free to begin the process of rewriting the methane rule. And Judge Janice Rogers Brown, the only member of the panel nominated by a Republican president, dissented from its ruling. Blocking the temporary 90-day stay simply wasn’t within the court’s powers, she said, because only final EPA decisions are reviewable by the courts.

Just because environmental groups “are anxious to see their victory implemented and impatient with [the] delay does not make EPA’s action final,” Brown writes. “It may be annoying, disappointing, ill-advised, even unlawful, but that does not transform a stay to facilitate reconsideration into ‘final agency action.’”

These arguments could carry more weight if the case rises to the more conservative Supreme Court.

Both the EPA and BLM methane rules were meant to help bring about President Barack Obama’s commitment for the United States under the Paris Agreement on climate change. Obama hoped to cut the greenhouse-gas emissions from fossil-fuel companies by 40 percent by 2025, as compared to 2012 levels.