Whatever happened to the future? Brexiteers cling on to a fantastical mixture of empire, war and an England whose genius was supposedly embodied by Winston Churchill and Margaret Thatcher. In the United States, Donald Trump harks back to an America of economic might: musclebound men toiling in car factories and coalmines, and splendid isolation. A recent issue of the Economist surveyed politics in Europe and the US and observed “an orgy of reminiscence”, partly traceable to the fact that millions of westerners cannot shake off a deep and understandable sense of decline.

There’s an obvious irony in having to look back to find something better, but 2019 marks the 30th anniversary of a run of events that embodied pretty much the polar opposite: optimism, faith in the future and a sense of shared humanity that could not be more different from the polarised, rancorous mood of today. As this year unfolds, the events of 1989 – a year as replete with significance as 1848, 1945 or 1968 – will be celebrated and picked apart; in Berlin there will be an impressive run of commemorative events . Leafing through histories of the time, and thinking back to what happened, what most sticks out is a set of emotions and impulses that we would do well to revive: defiance, joy, an urge to run headlong into whatever happened next.

The year 1989 was one of largely peaceful revolutions that swept through central and eastern Europe, calling time on Soviet communism. In that region of the world, humanity confronted a wall of power that surreally crumbled away. If you want a sense of what was suddenly afoot, have a look at the famous footage of the Romanian dictator Nicolae Ceaușescu on 21 December 1989 unsuccessfully attempting to subdue a crowd suddenly full of a sense of their collective power, and thereby realising he was finished.

Six months before, when the same spirit of defiance surfaced in Beijing, the result was the carnage of Tiananmen Square, though events there gave the world another vivid image of what it is to directly confront your oppressor: the famous lone protester – whose identity remains unknown – standing before a line of tanks, vainly trying to stop the inevitable. That picture now stands as a breathtaking embodiment of 1989’s emancipatory spirit, and how easily it could be snuffed out. But in eastern Europe, a sense of liberation and possibility seemed to prevail, and even to reach the crabby old UK.

Alexandra Richie’s masterful history of Berlin, Faust’s Metropolis, rightly characterises what happened in the German capital in 1989 as the culmination of a story that had begun elsewhere in the old eastern bloc: in Poland, Hungary and, perhaps most crucially, the Soviet Union under Mikhail Gorbachev. But she evokes the wonderment that transpired as people walked in amazement from East to West: “Delirious crowds continued to surge across – some in their nightclothes and bedroom slippers; everyone sensed that this was a moment that they would savour for the rest of their lives ... the party lasted well into the night; Radio Sender Freies Berlin said that more than 50,000 had crossed into West Berlin on that first night alone, people who had come ‘just to see’, for the night.”

Closer to home, the upsurge known as acid house had decisively arrived in the summer of 1988, and quickly attracted a mixture of tabloid outrage, government hostility and police suppression. Its two basic components were electronic (and futuristic) dance music, and ecstasy – the drug that filled its users with the euphoric sense of connection to others known as being “loved up”. The result, played out every week in the huge Manchester club the Hacienda, was perfectly described to me by its co-owner, Tony Wilson: “You could take any human being, of any sort, to the Hacienda from mid-89 onwards and they would just love it. Human beings love fun and happiness and exuberance, and it was the epitome of that.”

‘The acid house uprising added to the profound sense that a new era was opening, and many of the miseries of the previous decade would be over.’ Photograph: REX/Shutterstock

I was one of those people. If anything, Wilson’s testament was an understatement. It may seem fanciful to draw lines between scenes on British dancefloors and what was afoot in former communist countries, but they are obvious enough. The 1980s had been a decade of social division, nuclear paranoia and endless strife. Now, if you were in the right place at roughly the right time, what seemed to be superseding all that was a profound sense that a new era was opening, and many of the miseries of the previous decade would be over. By the end of 1990, Nelson Mandela was out and Thatcher was out; seven years later, the fact that New Labour was able to seize on a mood of pop-cultural optimism was proof that some of 1989’s spirit had lingered on.

But as the Blair years would prove, the legacy of 1989 would also curdle into hubris. In the summer of 89, the American economist Francis Fukuyama famously declared the final triumph of liberalism and the alleged end of history, a belief enacted in the real world by the application of brutal free-market economics to the newly liberated countries of eastern Europe, which spread a resentment that still runs deep. The fate of the Balkans proved that the euphoria of 1989 was often completely misplaced. And the same arrogance that defined the western powers’ economic policies would lead on to the Iraq war – a fatal application of the cursed concept of “liberal interventionism”, which was 1989-era triumphalism all over.

Today Poland and Hungary are bywords for nostalgic populism. In Russia, Vladimir Putin’s raison d’etre seems to be avenging the west’s post-89 humiliation of his country, re-rooting its self-esteem in the Soviet era. In contrast to 1989’s all-too-brief burst of people power, we seem to be stranded in an era of strongmen and rampant nationalism, in which the open, liberating nature of 1989’s crowds has been superseded by the baying of online mobs. And for all that pop music and its surrounding culture still seem to offer a diverse, colourblind antidote to the nastiness and hatred in our midst, an upsurge as huge and transformative as acid house seems unthinkable.

All of which comes down to a set of obvious iron rules: that parties have to end, that history speeds on, and that things always turn out to be much more complicated than they first appear. Nonetheless, across the world, the social liberalism and internationalism that defines a large share of my generation and took deep root among millennials is one of 1989’s obvious legacies; and the fact that Trump, Brexit and the new populism are so loudly contested is proof that the world really did change. And, as 1989 teaches us, everything will sooner or later change again. The demagogues and chancers of our time will have their own Ceaușescu moments, and today’s walls will eventually come down.

• John Harris is a Guardian columnist