(Reuters) - More U.S. coal-fired power plants were shut in President Donald Trump’s first two years than were retired in the whole of Barack Obama’s first term, despite the Republican’s efforts to prop up the industry to keep a campaign promise to coal-mining states.

In total, more than 23,400 megawatts (MW) of coal-fired generation were shut in 2017-2018 versus 14,900 MW in 2009-2012, according to data from Reuters and the U.S. Energy Information Administration (EIA).

Trump has tried to roll back rules on climate change and the environment adopted during the Obama administration to fulfill pledges to voters in states like West Virginia and Wyoming.

But the second highest year for coal shutdowns was in Trump’s second year, 2018, at around 14,500 megawatts, following a peak at about 17,700 megawatts in 2015 under Obama.

One megawatt can power about 1,000 U.S. homes.

The number of U.S. coal plants has continued to decline every year since coal capacity peaked at just over 317,400 MW in 2011, and is expected to keep falling as consumers demand power from cleaner and less expensive sources of energy.

Cheap natural gas and the rising use of renewable power like solar and wind have kept electric prices relatively low for years, making it uneconomic for generators to keep investing in older coal and nuclear plants.

Generators said they plan to shut around 8,422 MW of coal-fired power and 1,500 MW of nuclear in 2019, while adding 10,900 MW of wind, 8,200 MW of solar and 7,500 MW of gas, according to Reuters and EIA data.

The predictions come from estimates compiled by Thomson Reuters and U.S. Energy Information Administration data.

Since taking office in January 2017, the Trump administration has announced its intention to leave the 2015 Paris Agreement on climate change and is relaxing Obama-era rules on emissions from power plants as it seeks to boost domestic production of oil, gas and coal.

U.S. emissions of carbon dioxide, the main greenhouse gas, spiked in 2018 after falling for the previous three years as cold weather spurred gas demand for heating and the booming economy pushed planes and trucks to guzzle fuel, according to a study by Rhodium Group, an independent research group.

After falling to 5,144 million tonnes in 2017, the lowest since 1992, the EIA projected U.S. energy-related carbon emissions will rise to 5,299 million tonnes in 2018.

“There will be a limit to what increasingly cheap renewable power and continuously cheap natural gas can deliver with respect to emissions reductions,” said John Larsen, a director at Rhodium Group who leads the firm’s power sector research, noting the rising use of gas to produce power as coal plants shut. Natural gas emits about half the carbon as coal.

The Trump administration has also tried to slow the retirement of coal and nuclear plants through a directive in 2017 from Energy Secretary Rick Perry to subsidize the aging units because they make the electric grid more resilient.

That plan was bashed by advocates for gas, renewable power and consumers and unanimously rejected by the U.S. Federal Energy Regulatory Commission (FERC), led by former Chairman Kevin McIntyre. The plan could resurface now that Trump has a chance to replace McIntyre, who died on Jan. 2.