The Trump administration formally rescinded an Obama-era rule governing hydraulic fracturing (fracking) on public and tribal lands on Thursday, bringing an end to nearly three years of legal wrangling that pitted four states, an Indian tribe, environmentalists and energy industry groups against each other.

On Thursday, the Department of Interior’s (DOI) Bureau of Land Management (BLM) issued a final rule to officially rescind the fracking rule the DOI unveiled in March 2015. The new final rule is scheduled to be published in Friday’s edition of the Federal Register.

In a joint statement, the Independent Petroleum Association of America (IPAA) and the Western Energy Alliance (WEA), which had sued the DOI immediately after it unveiled the fracking rule, applauded its rescission.

“IPAA has long fought for independent oil and natural gas producers against an Obama-era federal rule that was overly restrictive and did not make fracking any safer than current state laws,” said Barry Russell, CEO of the IPAA. “The rescinding of this burdensome rule…will save our member companies and those operating on federal lands hundreds of millions of dollars in compliance costs without any corresponding safety benefits.”

WEA President Kathleen Sgamma added that both groups had been united in opposition to any fracking rule since 2010, when DOI first began considering one.

“It was clear from the start that the federal rule was redundant with state regulation and politically motivated, as the prior administration could not point to one incident or regulatory gap that justified the rule,” Sgamma said. “WEA appreciates that BLM under Interior Secretary Ryan Zinke understands this rule was duplicative and has rescinded it. States have an exemplary safety record regulating fracking, and that environmental protection will continue as before.”

Rescission of the rule was not a surprise. In July, the BLM said it planned to rescind the rule citing “unnecessarily duplicative” regulation and “burdensome reporting requirements and other unjustified costs on the oil and gas industry.” BLM acted to satisfy an executive order signed by President Trump in March, which included a directive for the agency to review, rescind or revise the fracking rule, also known as “Oil and Gas: Hydraulic Fracturing on Federal and Indian Lands.” Zinke also issued a secretarial order that called for the rule’s review.

On Wednesday, a three-judge panel of the U.S. Court of Appeals for the Tenth Circuit, perhaps with the impending rescission of the rule on their minds, decided against rehearing arguments on the matter. Although the panel didn’t specify why it had denied a rehearing, the same panel in September cited Trump’s election and the subsequent redirection of the BLM toward rescission.

A district court judge in Wyoming ruled in June 2016 that the BLM did not have the authority to regulate fracking.

In a strange twist in November, attorneys for the government and a coalition of environmental organizations were on the same side in the fight over the fracking rule, albeit for different reasons. Both groups had urged the Tenth Circuit to leave the panel’s ruling from September intact, and wanted the district court ruling vacated.

While the government had its eye on eventual rescission, the environmental groups — Sierra Club, Earthworks, Western Resource Advocates, Conservation Colorado Education Fund, the Wilderness Society and Southern Utah Wilderness Alliance — pushed for a vacatur that would have revived the fracking rule, at least temporarily.

The legal dispute involved two companion cases: State of Wyoming et al v. Zinke et al [No. 16-8068] and State of Wyoming et al v. DOI [No. 16-8069]. Appellees in the cases included Colorado, North Dakota, Utah and Wyoming; the Ute Indian Tribe of the Uintah and Ouray Reservation; and IPAA and WEA.