Hundreds of police officers have started evicting protesters from tree houses in what remains of a formerly vast forest in Western Germany.

Officers moved cranes and backhoes into a strip of ancient woodland where activists have lived for years on the edge of a growing open-pit mine.

Pushing their way into the heart of a forest that has existed for 12,000 years, where some 60 tree houses have been built over the past six years, thousands of police officers began cutting trees to reach a central community called “Oaktown.”

They tore down at least one treehouse and detained more than a dozen protesters, on the ground and in the trees, the police said.

In recent weeks, environmentalists have drawn attention to the mine, which is operated by the energy company RWE in the Hambach Forest, east of the city of Aachen.

They aim to highlight the disparity between Germany’s pledges to reduce its carbon emissions and uphold its commitments to the Paris climate accord and the country’s heavy use of its only significant natural resource, soft coal, or lignite.

The police set the stage to clear protesters from the trees Thursday, after the state government of North Rhine-Westphalia declared that the tree houses, many more than 80 feet off the ground, violated local fire codes.

They ordered local municipalities to clear the structures in order “to protect the bodies and lives of their dwellers,” the city of Kerpen said in a statement.

The Aachen police said that protesters had built barricades, some of which they set alight, and emptied the contents of their toilets from the tree houses onto officers below.

Protesters have insisted the only threat comes from RWE, which has expanded the coal mine to the point that it now covers more than 90 per cent of the forest, which once stretched over nearly 10,000 acres.

For the past six years, protesters have been actively squatting in the remaining 250 acres of trees, which RWE plans to begin clearing in October.

RWE has said the forest must be cleared so the open-pit mine can be expanded to draw the lignite, nearly a mile underground, if Germany wants to keep the lights on and factories running in North Rhine-Westphalia, its most densely populated state and a key industrial base.

The state is also the country’s largest emitter of greenhouse gasses, responsible for 10 per cent of all carbon emissions in 2014, according to government figures.

“They are destroying a lot already,” said Michael Zobel, a forest ranger.

He said that a court was still considering a lawsuit filed by Friends of the Earth Germany that would place Hambach Forest under protected status and prevent the trees from being cut down. “But they are making it a fait accompli.”

Mr Zobel, who has given tours of the forest since 2004, plans to lead another group on Sunday, although he said they won’t be able to access the forest, which is now sealed off by about 4,000 police.

The Aachen police declared the forest, which contains English oaks and hornbeam, and has a carpet of lily-of-the-valley each spring, a “dangerous area” two weeks ago, allowing them to maintain a 24-hour presence and search anyone caught on the land.

“We have seen a spiral of violence coming from the forest that is more severe than what we have seen in the past,” said Andreas Müller, a spokesman for the police, of the events of recent weeks.

These included stones thrown at officers and explosive devices found attached to trucks owned by RWE.

In the cat-and-mouse game that has ensued, the police have posted images of tyres bristling with spikes intended to hamper their approach, while protesters have circulated videos of squatters being forcibly removed from wooden platforms erected as barriers.

Officers armed with shields and helmets and driving cherry pickers to help them reach the huts in the branches moved into the forest and began disassembling the elevated platforms and roadblocks.

Last year, a court order prevented RWE from clearing the trees during a four-month season, limited to protect nature.

In a meeting between RWE and several environmental groups, the energy company offered to halt the clearing until 15 December, if the activists would agree to leave the trees peacefully. The activists refused.