The Environmental Protection Agency’s decision to roll back a regulation to make hard rock mining companies pay for clean up is sparking a new legal battle between Alaska and environmental groups.

The state is intervening in a lawsuit over the EPA’s decision to rescind an Obama-era rule that would make sure hard rock mining companies pay for cleaning up their messes, even if they go bankrupt.

Hard rock mining refers to any type of mining that deals with metals like gold and copper. The proposed Donlin gold mine in the Yukon-Kuskokwim Delta and the proposed Pebble mine in Bristol Bay would fall into that category.

Then-President Obama issued the rule under the Comprehensive Environmental Response, Compensation, and Liability Act, also known as CERCLA. That law usually targets superfund sites; many massive superfund sites have to deal with dangerous waste left over from legacy hard rock mining.

Cori Mills, a spokesperson for the Attorney General’s office, says the state already has a program in place to make sure mining companies are held financially responsible, so, it doesn’t need the EPA’s help.

“You know engaging in this CERCLA just on the release of hazardous substances — that would potentially preempt the state’s program which is really more comprehensive than just that CERCLA requirement,” Mills said.

Obama’s decision had come after environmental groups filed a lawsuit a few years ago, arguing that the EPA never created a rule that would make mining companies pay for reclaiming hazardous waste. Earthjustice attorney Jan Hasselman says the Obama’s rule would not have usurped the state’s program.

“The proposed rule explicitly stated that it doesn’t preempt or usurp any state authorities. In fact, it was designed to work alongside existing requirements,” Hasselman said. “I think the key finding that the EPA previously made was that there were gaps in the state system and that there was need for the federal government to set a uniform floor for these kinds of activities going forward.”

The Trump administration’s new EPA head, Scott Pruitt, rolled back the rule in December of 2017. Pruitt said that there are already regulations in place from states and federal agencies that require financial assurances for cleanup, even if the companies are bankrupt. .

So environmental groups, including Earthjustice, petitioned the U.S. Court of Appeals for the District of Columbia Circuit to review the agency’s decision. This lead to Alaska joining seven other states to back up the EPA’s position in this latest legal fight.