The state of North Dakota is rich in a kind of soft, brown coal, called lignite, which it burns to make electricity, selling the excess to neighboring states and Canada.
When then-President Barack Obama rolled out the Clean Power Plan in 2015, intending to curb the use of coal-fired power, state officials viewed it as a major threat.
"The Clean Power Plan was forcing conversion from coal-based generation," said Special Assistant Attorney General Paul Seby. "It would have impaired North Dakota dramatically."
So, along with more than two dozen other states and coal companies, North Dakota successfully sued to stop the plan from taking effect in 2016.
But in years since, coal power generation declined anyway, hitting a 42-year-low in 2019, according to the U.S. Energy Information Administration.
In a 6-3 decision late last month in West Virginia v. EPA, the U.S. Supreme Court's conservative majority blocked the EPA from putting out another regulation as broad as the Clean Power Plan. However, that ruling is unlikely to reverse coal power's downward trend, say analysts.
That's because the main driver was not government intervention, according to Natalie Biggs, global head of thermal coal markets for the research firm Wood Mackenzie.
"The development of fracking technologies and very cheap natural gas production in the U.S. played a much larger role in the decline of coal generation than environmental policies," she said.
At the same time that coal was fighting in the courts, the U.S. saw a glut of natural gas come to market.
Coal power capacity peaked in 2011, but as that decade stretched on nearly one-third of the U.S. coal fleet shut down, according to the National Bureau of Economic Research.
Hundreds that have not closed switched over to running on natural gas, according to federal data.
As a result, coal went from providing more than half of the country's electricity, according to NBER researchers, to less than a quarter.
Natural gas also emits far less carbon dioxide when burned, so even without the Clean Power Plan, the U.S. hit the carbon emissions targets set in that policy anyway, and years ahead of schedule, according to the Environmental Integrity Project.
"The bottom line is that so many of these companies have made the decision to move away from coal for a lot of different reasons, mostly economic reasons," said Taylor Kuykendall, who covers the metal and mining sector for S&P Global Commodity Insights.
Government policy, while not the main driver of the decline, has helped solidify it and discourage new plants from being built, he said. Pollution standards for mercury and coal ash make it more expensive to think about building coal plants.
Not only that, but any new plan comes with "a target on its back," said Kuykendall. "You're going to face pressure from somebody to either not build it or to have it closed down," he continued. Major corporations, such as Google, and more than a dozen states have their own clean energy goals, adding to the push to turn away from fossil fuels.
During the last couple of years, natural gas prices rose, pushing up coal use once more, but Biggs said that is unlikely to last.
"Eventually the gas markets will adjust and coal will be under the same competition pressure going forward," she said.
With the price of renewable energy dropping as well, new competitors will add to that pressure.
Seven years after the Clean Power Plan made waves, its critics won in the country's highest court. Many who fought the case talk about their win as one against executive overreach, not a win for coal.
"If Congress had intended to give EPA such sweeping authority to transform an entire sector of our economy, Congress would have done so explicitly," said Republican West Virginia Sen. Shelley Capito, in a statement about the decision.
"The court recognized the cooperative federalism aspect of how [the Clean Air Act] was written," said Seby.
North Dakota still makes more than half of its electricity by burning coal, but some plants there are shutting down, too. Seby points out that wind power, fueled by steady gusts crossing the Great Plains, is also a major player.