Thousands of anti-coal demonstrators descended on Germany’s Hambach forest on Saturday to celebrate an unexpected court victory that suspended an energy company’s planned razing of the woodland to expand a giant opencast mine.

The ancient forest near Cologne has been occupied by activists for the past six years and has become a symbol of resistance against coal energy in Germany, a country that despite its green reputation remains heavily reliant on this dirty fossil fuel.

Young people, families and pensioners flocked to a field next to Hambach forest a day after a court in Münster said it needed more time to consider an environmental complaint against RWE’s upcoming clearing operations.

Organisers said 50,000 people had turned out for what they called the region’s “biggest ever anti-coal rally”. Police did not confirm the figure.

Chanting “Hambi bleibt!” (Hambi stays) and cheering, the crowd listened to live music and speeches in a festival-like atmosphere. Many held banners and balloons demanding an immediate exit from coal energy.

“The mood is great,” said Greenpeace spokeswoman Gesche Jürgens, who welcomed the court’s decision as a “strong signal”. “But it’s only a first step. The battle goes on to start phasing out coal.”

The forest’s days had appeared numbered after its owner, RWE, announced plans to clear half of the remaining 200 hectares (500 acres) from 15 October to expand its nearby open coalmine. Police last month began dismantling activists’ treehouses in a forced eviction that took nearly three weeks and fanned public sympathy for their cause.

Tragedy struck when Steffen Meyns, a freelance journalist covering the evictions, died on 19 September after falling through a walkway suspended between two trees.

RWE said on Friday it believed a final judgment in the court case could take until late 2020, which sent its share price plunging – news that was greeted with loud applause at the demo.

Buoyed by the court’s temporary reprieve, demonstrators said they were hopeful Hambach forest could be saved. “I have faith. So much can happen in two years’ time. They’ll have no choice but to keep the forest,” said 43-year-old teacher, Julia. “I hope so,” her 10-year-old son, Arne, added.

At the edge of the forest, demonstrators paused to take in the sweeping view of RWE’s mine. Two coal plants in the distance belched clouds of smoke into the sky, while dozens of wind turbines dotted the horizon.

“One is the future, the other is the past,” mused 40-year-old resident Benjamin.