DOMINICK REUTER via Getty Images It seems the market got the message.

Shares of U.S. oil and gas companies spiked Wednesday after Donald Trump won the presidency, but the biggest winner seems to be the ailing coal industry.

Oil giants BP, Chevron and Exxon Mobil made modest gains of less than 1 percent. But stock in bankrupt Peabody Energy, the world’s largest privately owned coal company, skyrocketed over 47 percent. ConocoPhillips, a Houston-based oil giant specialized extracting gas from coal seams, climbed nearly 3 percent.

Trump vowed in May to revitalize a coal industry that had all but collapsed amid a series of ill-timed bets on Chinese demand and competition from cheaper natural gas and renewable energy. Like Peabody, Arch Coal, Alpha Natural Resources and Patriot Coal have filed for bankruptcy in recent months.

The president-elect, who has denounced scientific evidence of climate change as a “hoax,” said he plans to scrap President Barack Obama’s Clean Power Plan, his signature effort to combat global warming. The plan, stalled since February by court challenges, would have empowered the U.S. Environmental Protection Agency to force utility companies to slash emissions.

Google Finance Earlier this year, Peabody Energy declared bankruptcy. Now it may have a bright, if smoggy, future.

In an ironic twist, hope for a resurgence of the world’s dirtiest fossil fuels comes as world leaders are gathered in Marrakech, Morocco, for the 22nd Conference of the Parties. Last year, the climate conference yielded the historic Paris accord, in which 180 countries agreed to curb greenhouse gas emissions in an attempt to avoid the worst effects from global warming. The treaty, which Trump threatened during his campaign to unravel, went into effect last Friday.

The solar industry suffered a major rout on Wednesday. SolarCity, the Elon Musk-led solar installer looking to merge with Tesla later this month, plunged nearly 6 percent. First Solar Inc. fell about 3 percent. SunPower Corporation plummeted almost 15 percent.

Trump has repeatedly slammed energy produced from renewable sources as too expensive and complained that wind turbines kill eagles. In fact, the price of clean energy has fallen drastically over the last eight years, and the renewable energy industries are producing more jobs than oil or gas.

“Let me tell you: The miners in West Virginia and Pennsylvania, which was so great to me last week and Ohio and all over, they’re going to start to work again, believe me,” Trump said at a rally earlier this year. “You’re going to be proud again to be miners.”

Part of Trump’s appeal to struggling coal miners in Appalachian states stemmed from his accusation that Obama had waged a so-called war on coal. But the industry has been contracting for decades, including under Republican presidents. In 1985, coal employed 177,000 people. By the end of 2008, that number had fallen to just 86,000. Now it’s just about 56,000.