The Trump administration on Wednesday completed one of its biggest rollbacks of environmental rules, replacing a landmark Obama-era effort that sought to wean the nation’s electrical grid off coal-fired power plants and their climate-damaging pollution.

Environmental Protection Agency chief Andrew Wheeler, a former coal industry lobbyist, signed a replacement rule that gives states leeway in deciding whether to require efficiency upgrades at existing coal plants.

Wheeler said coal-fired power plants remained essential to the power grid, something that opponents deny. “Americans want reliable energy that they can afford,” he said at a news conference. There’s no denying “the fact that fossil fuels will continue to be an important part of the mix,” he said.

Rep. David McKinley, a West Virginia Republican, was one of several coal country lawmakers on hand for the signing. He argued that power from the sun and wind was not yet reliable enough to depend on. “We’re not ready for renewable energy … so we need coal.”

President Donald Trump campaigned partly on a pledge to bring back the coal industry, which has been hit hard by competition from cheaper natural gas and renewable energy.

The rule will go into effect shortly after publication in the Federal Register. Environmental groups pledge court challenges.

“The Trump administration’s outrageous Dirty Power Scam is a stunning giveaway to big polluters, giving dirty special interests the greenlight to choke our skies, poison our waters and worsen the climate crisis,” House Speaker Nancy Pelosi, D-Calif., said in a statement.

Joseph Goffman, an EPA official under President Barack Obama, said he feared that the Trump administration was trying to set a legal precedent that the Clean Air Act gives the federal government “next to no authority to do anything” about climate-changing emissions from the country’s power grid.

The Obama rule, adopted in 2015, sought to reshape the country’s power system by encouraging utilities to rely less on dirtier-burning coal-fired power plants and more on electricity from natural gas, solar, wind and other lower or no-carbon sources.

Burning of fossil fuels for electricity, transportation and heat is the main human source of heat-trapping carbon emissions.

Supporters of the revised rule say the Obama-era plan overstepped the EPA’s authority.

“This action is recalibrating EPA so it aligns with being the agency to protect public health and the environment in a way that respects the limits of the law,” said Mandy Gunasekara, a former senior official at the EPA who helped write the replacement rule. She now runs a nonprofit, Energy45, that supports President Donald Trump’s energy initiatives.

“The Clean Power Plan was designed largely to put coal out of business,” Gunasekara said. Trump’s overhaul is meant to let states “figure out what is best for their mission in terms of meeting modern environmental standards” and providing affordable energy, she said.

Democrats and environmentalists say the Trump administration has ignored scientific warnings about climate change as it sought to protect the sagging U.S. coal industry.

“The growing climate crisis is the existential threat of our time and President Trump’s shameful response was to put lobbyists and polluters in charge of protecting your health and safety,” Pelosi said.

With coal miners at his side, Trump signed an order in March 2017 directing the EPA to scrap the Obama rule. It was one of the first acts of his presidency.

His pledge to roll back regulation for the coal industry helped cement support from owners and workers in the coal industry, and others. Despite his promise, market forces have frustrated Trump’s efforts . Competition from cheaper natural gas and renewable fuel has continued a yearslong trend driving U.S. coal plant closings to near-record levels last year, according to the U.S. Energy Information Administration.