M ass protests had been erupting throughout eastern Europe for months. In Czechoslovakia, a poet named Vaclav Havel was leading the “velvet revolution”. Poland had already ripped off the yoke of single-party Communist rule. And protesters were out in the streets in Bulgaria, Romania and Hungary.

It was clear that something was going to give in East Germany as well, where a peaceful protest movement was being led by church activists and schoolteachers against the single-party rule of the communist Socialist Unity Party.

But few expected the end to come quite so abruptly, and the Berlin Wall, which had stood as a symbol of animosity between the capitalist west and the communist eastern Europe, to be wiped away so quickly.

World leaders on Saturday gathered in Berlin to mark the 30th anniversary of the fall of the Berlin Wall at a time of deep insecurity about the values the historic event upheld, and the liberal western order it strengthened.

“The values upon which Europe is founded ... they are anything but self-evident,” German chancellor Angela Merkel said during a ceremony early Saturday at a church located in the former no-man's land that separated the two sides of Berlin. “And they must always be lived out and defended anew.”

The anniversary comes at a particularly dark moment for the values that wall’s opening heralded. Populist right-wing government and movements have surged, challenging the ideas of open borders and free markets that appeared triumphant 30 years ago.

Berlin Wall anniversary – in photos Show all 20 1 /20 Berlin Wall anniversary – in photos Berlin Wall anniversary – in photos A berliner holds up a hammer and a chisel early on 15 November 1989 in front of the wall at the Brandebourg Gate AFP/Getty Berlin Wall anniversary – in photos East and West German Police contain the crowd of East Berliners flowing through the recent opening made in the Berlin wall at Potsdamer Square AFP/Getty Berlin Wall anniversary – in photos An East German border policemen, right, refuse to shake hands with a Berliner who stretches out his hand over the border fence at the eastern site nearby Checkpoint Charlie border crossing point AP Berlin Wall anniversary – in photos East German citizens climb the Berlin wall at the Brandenburg Gate as they celebrate the opening of the East German border Reuters Berlin Wall anniversary – in photos A little girl chisels away at the Berlin Wall from the east side on New Year's Eve, 31 December 1989 Getty Berlin Wall anniversary – in photos Woman holds up pieces of the Berlin Wall she found when the latest passage was opened at Wollankstrasse in West Berlin's district of Wedding AP Berlin Wall anniversary – in photos West Berliners crowd in front of the Berlin Wall early 11 November 1989 as they watch East German border guards demolishing a section of the wall in order to open a new crossing point between East and West Berlin AFP/Getty Berlin Wall anniversary – in photos A West Berliner welcomes a East Berliner as she pours Champagne onto his car at Wollangstrasse where a new crossing point into the West has opened AFP/Getty Berlin Wall anniversary – in photos A construction worker builds part of the wall. At the time it was put up, many people were afraid that the wall would serve as a provocation and turn to the Cold War into a hot one AP Berlin Wall anniversary – in photos West Berlin children play at 'constructing the Berlin wall' with make believe arms and imitating East and West Berlin wall security guards. Meanwhile, further construction was happening on the other side of the divide: in the same year, a second parallel barrier was built in the east of the city and the houses between the two structures razed to the ground, creating an exposed wasteland area that was known as the 'death strip' Rex Berlin Wall anniversary – in photos David Hasselhoff performs by the Berlin Wall on New Year's Eve 1990 Berlin Wall anniversary – in photos Curious West Berliners peep over the stone and barbed wire barrier blocking off East Berlin from West. The first person to be shot dead for trying to cross, Gunter Liftin, had a flat in the West but had been visiting his mother in the East when the wall suddenly went up Rex Berlin Wall anniversary – in photos An East German bulldozer and crane knock down the Berlin Wall at Potsdamer Platz Reuters Berlin Wall anniversary – in photos People from East Germany greet citizens of West Germany at the Brandenburg Gate in Berlin AFP/Getty Berlin Wall anniversary – in photos A young boy is trying to show his talent by drawing on the East side of the Berlin Wall AFP/Getty Berlin Wall anniversary – in photos A group of East German police officers look on as workers continue to demolish a section of the Berlin Wall AFP/Getty Berlin Wall anniversary – in photos An East Berliner with West german flag and flowers enters West berlin amidst a crowd of East germans flooding through the recently made opening in the Berlin wall at Potsdamer Square AFP/Getty Berlin Wall anniversary – in photos Thousands of young East Berliners crowd atop the Berlin Wall, near the Brandenburg Gate on 11 November 1989 AFP/Getty Berlin Wall anniversary – in photos West-Berliner citizens sit on the Berlin wall as East-German policemen stand guard on November 10, 1989 to ask for the fall of the Berlin wall AFP/Getty Berlin Wall anniversary – in photos East-Berliner citizens are welcomed by the crowd as they enter West-Berlin by car at the Checkpoint Charlie on 9 November 1989 AFP/Getty

Among visitors to Germany for the commemoration were leaders of former eastern bloc countries whose leaders now are drifting away from democracy, and US secretary of state Mike Pompeo, whose boss has made building a wall across the country’s border with Mexico a signature promise.

Even the western alliance that won the Cold War against the Soviet Union is badly fraying, with French president Emmanuel Macron warning last week that Nato was imperiled.

“The west – all of us – lost our way in the aftermath of that proud moment,” Pompeo said after meeting with Merkel on Friday. “We thought we could divert our resources away from alliances, and our militaries. We we were wrong.”

Germany itself is unified and prosperous but is also suffering from political paralysis and fragmentation that has given an opening to the far right.

Security was extraordinarily tight at the Brandenburg Gate where the official celebration was to unfold, and many revelers were told by police to go away. “This is a celebration for Berliners and Berliners aren’t allowed in,” complained one resident of the city.

The mural painting ‘My God, Help Me to Survive This Deadly Love’ by Russian painter Dmitri Vrubel is projected on a stretch of the wall (AFP/Getty) (AFP via Getty Images)

Dozens of accredited journalists were denied access to the press area over unstated, last-minute security concerns. The area around the Brandenburg Gate was turned into a harrowing maze of police barriers, as security vehicles blared sirens as they ferried in VIPs.

Thirty years ago, though the weather was colder, the mood was more joyous.

On 9 November 1989, apparently acting on a misunderstood order about border security, East German guards began allowing citizens to freely cross into West Berlin.

A weeks-long party ensued, as East and West Berliners and tourists visiting from abroad imbibed alcohol and took gleefully to the wall with hammers and axes. The enterprising sometimes rented out tools to tourists.

The city’s transport, telecommunications and banking infrastructure strained under the weight of hundreds of thousands of east Germans pouring into West Berlin to collect their 100 deutschmarks in “greeting money” from the West Germans, see the sights they had long been denied unless they were retirees or communist party elite, and perhaps purchase goods they were long denied, like bananas.

Over decades, urban planners stitched the divided city back together, as Berlin retained its status as capital of a unified Germany. Mass transit lines that were cut off were reconnected. The massive area where the wall once stood has been all but obliterated, redeveloped into corporate headquarters and shopping plazas.

West Berlin was long a centre of culture. But the unified has emerged as a global capital of commerce and political power.

“Everywhere where the wall once brought despair and death, today thrives the life of Berlin,” said Michael Muller, mayor of Berlin, during the commemoration ceremony at the Brandenburg Gate. “Berlin is connected to the whole world, it shines to the whole world as a city of freedom.”

Visitors attend the celebrations at the Brandenburg Gate (EPA)

In his speech, Muller also recalled 9 November 1938, the day Nazis launched a pogrom against Jewish businesses and civic culture throughout Germany in what came to be known as Kristallnacht, calling it “one of the most horrible days of our history”.

“We know, that freedom is not something you only have to fight for one time,” he said. “We all ought to defend our values against those who attack them with words and brutal violence. We must not succumb to the populists and those who spread hatred. We in Berlin know that we have the power to do that.”

German president Frank-Walter Steinmeier described 9 November as “an ambivalent day, of light and shadow”, a moment of celebration 30 years ago, but also a day 81 years ago of a “fall into barbarism, of burning synagogues and the beginning of the hunting and murder of the Jews”.

He referred to the attack on a synagogue in the city of Halle earlier this year by a far-right extremist, who opened fire on worshippers and bystanders on Yom Kippur, killing two.