The German energy company RWE “made a big mistake,” according to energy researcher Patrick Graichen.

RWE owns the Hambacher Forest in the western German state of North Rhine-Westphalia, an old-growth oak and beech forest 25 miles from Cologne. It’s home to owls, dormice and the endangered Bechstein’s bat, but for RWE, it’s not what’s in the forest that counts, but what’s under it: lignite or “brown coal,” the source of 23 percent of Germany’s electricity. (Anthracite or “black coal” makes up another 13 percent).

For decades, RWE has been slowly razing the forest and surrounding towns to expand its adjacent coal mine, which is among Europe’s largest producers of lignite coal and greatest sources of carbon dioxide pollution. And earlier this fall, the company moved to start cutting a new section that protesters have been occupying.

Related: Germany talks a good game on climate, but it's still stuck on coal

The activists had been living in homemade treehouses in an effort to block RWE from clear-cutting, and after a yearslong standoff, things came to a head when RWE called in federal police to evict the tree-sitters and destroy their camps. Activists were arrested, and in the melee a journalist fell from a tree and died.

Climate activists gather in the Hambacher Forest to protest Germany's continued use of heavily polluting coal. Credit: Marcus Teply/The World

The events sparked a public outcry here, in part because Germany has officially decided that coal’s days are numbered.

In recent years, Germany has staked much of its national identity and reputation on its Energiewende or national transition to cleaner energy sources as part of its effort to fight climate change. The country now produces 35 percent of its electricity with renewables and has cut carbon emissions 28 percent from 1990 levels.

But to meet its future climate targets, Germany needs to make far greater cuts, and that means phasing out coal-fired power plants, which are a major source of the greenhouse gas pollution that’s linked to atmospheric warming. In February, Chancellor Angela Merkel’s government agreed for the first time to set a firm deadline to close down the coal-power industry. A government commission is now working out the details and is expected to announce its recommendations by the end of the year.

That made it an awkward time for RWE to push forward on cutting down Hambacher Forest, said Graichen, director of the climate think tank Agora Energiewende.

“They thought, while at the same time, while the coal commission was debating about the future of coal, they could go on doing business as usual,” Graichen said. “And of course, that was the key trigger to mobilize the environmental movement in Germany.”

Related: In Germany, miners and others prepare for a soft exit from hard coal

Over several weeks this fall, Hambacher Forest became an unexpected poster child for Europe’s anti-coal movement. Local families joined climate activists at the forest for nature walks, picnics and protests. Rallies drew tens of thousands of demonstrators from across Europe. And the rallying cry, “Hambi bleibt” (“Hambi stays”), went viral on social media, garnering support from as far away as Australia and the United States, and inspiring a nearby counterprotest by coal workers to adopt the slogan, “Hambi muss weg” (“Hambi must go”).

For its part, RWE says it’s not trying to fight the future.

“We know there is a coal exit,” said RWE spokesperson Guido Steffen. The company, which owns both coal mines and power plants, is also making the switch to renewables. But Steffen says Germany still needs coal for now because renewables aren't reliable enough yet.

Plus, he says, Hambacher Forest and the coal underneath it are RWE property.

“We have permits; we had court cases that stated [expanding] Hambach Mine is all right,” Steffen said.

Related: Britain built an empire out of coal. Now it’s giving it up. Why can’t the US?

The potential effect of the battle over Hambacher Forest on the coal commission’s decisions is still unknown, although Steffen admits that commission members “will not be unimpressed by the protests.” A Nov. 1 midterm report focused on plans for helping transition local economies in coal regions but it left discussions of an exit date for the final report, which is due in December.

After a recent court ruling blocking further cutting in the Hambacher forest, protesters built new tree houses to resume their occupation of the forest. Credit: Marcus Teply/The World

Leaks to German media have indicated the commission is weighing an exit date in roughly 20 years, between 2035 and 2038 — a decade sooner than RWE wants, but not soon enough for environmental groups.

Graichen says, if nothing else, the Hambacher Forest protests made it clear that Germany is paying attention — and expecting a solution to its coal problem. “Failure would be a disaster for German politics,” he said.

No matter what the commission decides, though, for now, Hambacher Forest is out of the woods. In a surprise twist last month, a German court ruled in a lawsuit brought by Friends of the Earth Germany (BUND) that RWE can’t cut any more trees there until 2020 at the earliest.

And the protesters have returned and built new treehouses in the forest.