Berlin (CNN) This week, the German city of Bonn is the venue for hundreds of diplomats who are busy hammering out a road map to save the planet from climate change.

The country would seem an ideal host, with its sterling reputation for driving an ambitious green agenda centered around "energiewende," or transition to renewable energy.

Yet less than an hour's drive away from the COP23 summit lies an example of Germany's dirty environmental secret: A 12-thousand-year-old forest that has been almost completely consumed by the country's ravenous addiction to coal power.

Germany's biggest electricity provider, RWE, runs the vast open-pit mine that encroaches on Hambach Forest. Giant steel excavators grind away at the 33-square mile hole, leaving a scar on the green landscape but producing 40 million metric tons of coal annually.

Every year since 1978, the mine has been allowed to fell a section of forest to access the lignite, or "brown coal," beneath. As a result, the Hambach woodland has now shrunk to less than 10% of its original size, according to estimates by RWE and environmental activists.

A court decision next week could clear the way for logging operations to continue again this year. If the court finds in favor of RWE, the firm says it plans to raze another section of the forest.

An activist's treehouse in Hambach Forest.

If you gaze up into the leaves of Hambach Forest, you may see the homes of its newest inhabitants perched amid the branches: More than 30 tree houses occupied by around 100 activists who see themselves as guardians of a woodland that sits atop one of the country's richest energy sources.

"They want to cut the forest down but they cannot cut the trees we live in. Unless, of course, they drag us down," explained Simon, a 30-year-old former forest ranger who now dedicates himself to environmental activism. He spoke to CNN from a solar-powered phone on the tree that has been his home for the last two years, and asked CNN not to publish his last name.

Europe's biggest polluter

Almost 40% of Germany's electricity comes from coal-powered plants -- nearly a quarter from brown coal -- making it Europe's biggest polluter, spewing out more than 20% of the greenhouse gas emissions from the European Union, according to Eurostat.

"We need lignite. Lignite is not subsidized and we have a good supply in Germany. It makes us less dependent on imported natural gas, oil or other fossil fuels," Guido Steffen, a representative for RWE, told CNN.

"Conventional energy is still needed for a country that is as industrialized and as populated as Germany. You need a lot of energy, and renewables are just not yet ready to fully supply the country."

A giant excavator operates at the mine in Hambach in 2015.

Germany has invested billions in renewable energy and there has been substantial progress: On one particularly sunny weekend this May, the country was able to meet a whopping 85% of its electricity needs through wind, solar and other clean energy sources, but it was unable to sustain that for long.

Previously, the country had relied on nuclear power, but after the 2011 tsunami that disabled Japan's Fukushima nuclear power plant, Chancellor Angela Merkel vowed to shut down Germany's nuclear plants by 2020.

That left lignite coal as one of the primary natural resources for Germany's energy needs. The number of coal-powered plants in the country has more than doubled in the last three decades, jumping from 35 to 76, according to the Climate Action Network Europe . Many of them are in the North Rhine-Westphalia region, where the Hambach mine is located.

Germany had hoped to cut greenhouse gas emissions by 40% in 2020, but that number is more likely to fall to little more than 30%, according to the Environmental Ministry.

"Phasing out nuclear power and coal at the same time does present major challenges," Armin Laschet, the Prime Minister of North Rhine-Westphalia, told attendees at the climate change conference in Bonn, though he remains optimistic.

"Mining in Germany could end inside the next two decades. We don't have an end date. But the expectation is it could be in the 2030s."

Further expansion planned

Activists protest at Hambach in August 2017.

In the meantime, the logging of Hambach's woodlands will continue, according to Steffen from RWE.

"We have had to log most of the Hambach Forest in the past, that is true. We are going to continue to log this season as well, it is inevitable. We have to do it because the forest is in the way of the excavators," he explained.

Steffen pointed out that RWE has committed to leaving at least 500 hectares of the original forest intact, and said that RWE has planted 10 million trees over the last 40 years on the other side of Hambach in the hopes of cultivating a new forest. "Unfortunately, people in favor of the old forest never mention this kind of re-cultivation," he added ruefully.

The energy giant also insists it is working hard to reduce CO2 emissions. Little more than six weeks ago, RWE shut down one lignite power station that was emitting as much as 5 million tons of CO2 a year. "We will close down more power stations so that by 2050, lignite mining will be finished and the CO2 footprint will be zero," Steffen said. "But this takes time."

Environmental activist Simon says the oldest part of the forest is now at risk.

For now, however, RWE is planning on expanding into the lignite reserves under Hambach Forest, even as environmental activists dig in, determined to resist. They have staged a forest occupation of sorts, creating a tree house village accessible only by rope ladders and powered by solar panels.

"If we can stop them this year, then we might have a chance at protecting the forest," Simon, the environmental activist, told CNN. "But if they proceed with the chopping as planned, it will destroy the oldest part of the forest."

"What will be left over will be isolated islands of woodland, young, disconnected, with little biodiversity."