In a move that's sure to restore a smidgen of Greta Thunberg's childhood, German Chancellor Angela Merkel has finally hammered out a deal for Germany's stalled exit from coal-fired power generation, after state leaders agreed to shut down the industry by 2038.

RWE Brown Coal Power Plant Niederaussem

We would note that this falls outside the 12-year window of doom predicted by US climate expert Alexandria Ocasio-Cortez, but better late than never when environmental apocalypse is on the line.

Germany's plan includes 40 billion euros ($44.6 billion) in compensation for impacted regions, according to Bloomberg. The country's largest coal-fired power producer, RWE AG, will receive 2.6 billion euros according to an insider - sending the stock up 1.7% in mid-morning trade on Thursday. In eastern Germany, utility Lignite operators will receive 1.75 billion euros according to German Finance Minister Olaf Scholz.

Merkel has been in a tight spot on the issue, facing pressure from environmentalists and miners alike. Climate tops voter concerns, and Germany will already miss its 2020 targets under the Paris Agreement. On the other hand, the poorer states in the former Communist East, where the bulk of the mines are, fear a growing gap to the West. Her predicament feeds into a broader political challenge, with the Greens party and the far-right Alternative for Germany gaining support on both sides of the political spectrum to squeeze Germany’s traditional mainstream parties, including her Christian Democrats. The AfD has been particularly strong in the eastern mining states. “It was a long night -- it lasted until 2 a.m. -- but we were able to achieve a sensible agreement,” Armin Laschet, premier of the state of North-Rhine Westphalia, said in an interview with Deutschlandfunk radio. “The time frame that we’ve agreed on is ambitious, but realistic.” -Bloomberg (via Yahoo!)

According to Laschet, approximately 3,000 jobs will be lost to the closures, which will occur more quickly in west German states.

The biggest resistance to the plan comes from states in the former communist east, which heavily relies on coal and has a lower income per capita than in the west.

Under Thursday's agreement, LEAG's Jaenschwalde power plant will convert into a gas-fired unit to use some of that sweet, sweet, Russian gas thanks to Nordstream 2. The government will also pay to retrain workers affected by plant closures - possibly in coding.