(Reuters) - A federal judge has struck down the Obama administration’s rules for hydraulic fracturing on public lands, a victory for oil and gas producers and state regulators who opposed the rules as an egregious overreach.

U.S. President Barack Obama delivers a statement at the Treasury Department in Washington, U.S., June 14, 2016. REUTERS/Carlos Barria

The ruling, which the White House vowed to appeal, halts the administration’s efforts to address what it sees as safety concerns in the industry and reverses what producers had seen as a first step toward full federal regulation of all fracking activity.

The U.S. Interior Department’s Bureau of Land Management (BLM) lacked Congressional authority to set fracking regulations for federal and Indian lands, U.S. District Judge Scott Skavdahl in Wyoming ruled late on Tuesday.

BLM’s rules, issued in their final form in March 2015, would have required companies to provide data on chemicals used in hydraulic fracturing and to take steps to prevent leakage from oil and gas wells on federally owned land.

Fracking, currently regulated by states, involves injection of large amounts of water, sand and chemicals underground at high pressure to extract oil or natural gas.

Environmental groups and some neighbors of oil and gas wells have linked fracking to water pollution as well as increased earthquake activity in certain areas.

Because most fracking in the United States takes place on private land, the case had little direct effect on existing operations. Roughly 22 percent of U.S. oil production comes from federal lands, with much of that from offshore Gulf of Mexico production, not shale fields.

Still, oil producers had feared the new regulations would be a step toward federal oversight of all fracking.

“This ruling sends a broad signal about who really does have the jurisdictional authority to regulate this area,” said Ryan Sitton of the Railroad Commission of Texas, which oversees the oil and gas industry in the top producing state.

In North Dakota, the second-largest producing state, roughly 16 percent of oil output comes from American Indian-controlled land, which would have been subject to the new regulations.

“This ruling protects private and state-owned minerals from being subjected to unauthorized federal rules,” said Lynn Helms, head of North Dakota’s Department of Mineral Resources, the state’s energy regulator.

‘EXCESS OF ITS STATUTORY AUTHORITY’

Skavdahl, nominated by Obama to the bench in 2011, had put the rules on hold a year ago to weigh requests from energy industry groups and four states to stop them from being implemented. He issued a preliminary injunction against the rules in September and made it permanent in Tuesday’s decision.

Skavdahl said the issue before the court was not whether fracking is good or bad, but whether Congress gave the Interior Department legal authority to regulate the practice.

“It has not,” he said. “The BLM’s effort to do so through the fracking rule is in excess of its statutory authority and contrary to law.”

Congress in the 2005 Energy Policy (EP) Act specifically removed hydraulic fracturing operations that do not involve diesel fuels from Environmental Protection Agency regulation under the Safe Drinking Water Act, Skavdahl added.

Proponents of the rules say regulations are needed to reduce potential pollution from fracking. Opponents say fracking has helped drive a boom in U.S. oil production, lowering energy costs and providing jobs.

The government’s appeal of last year’s injunction is pending at the 10th U.S. Circuit Court of Appeals.

The White House on Wednesday said it would appeal the ruling, while U.S. House Speaker Paul Ryan praised the ruling for acknowledging lawmakers’ powers and protecting “the energy revolution from the heavy hand of big government.”

“Only Congress can write laws,” Ryan said in a statement. “Agencies acting without authority from Congress is simply illegal.”

The Independent Petroleum Association of America and the Western Energy Alliance were joined by Colorado, Wyoming, North Dakota, Utah and the Ute Indian Tribe of the Uintah and Ouray Reservation in seeking to block the rules.

“We’re overjoyed with the ruling,” said Kathleen Sgamma, vice president of government and public affairs at Western Energy Alliance.

Still, environmental groups were nonplussed.

“The Bureau of Land Management clearly has the authority not only to set this weak rule on fracking but to take the much stronger actions needed to truly protect our public lands,” said Kassie Siegel, an attorney with the Center for Biological Diversity.

Representatives for the Interior Department could not be immediately reached for comment.