Like the Arab spring, the fall of the Berlin wall on 9 November 1989 was a clear and uncontestable good. Through the (largely) peaceful exercise of people power, six countries exchanged a fallacious democratic status for a real one. Although these revolutions were about overthrowing socialism rather than instituting it, it was hard for people on the left not be inspired by their success.

Twenty-five years on, celebration is still due. But predictably, not everything has turned out as expected.

In 1990, I wrote the first of what turned out to be an accidental trilogy of plays about the great events of the previous autumn, first produced by the National Theatre and the Royal Shakespeare Company, and now being performed together for the first time.

The Berlin Wall falling, under the gaze of the East German police. Photograph: Sipa Press/Rex Features

It’s important to remember the spirit of that spring and summer, when it seemed the entire youth of Europe was marching, the Ode to Joy on their lips, old Soviet army caps at jaunty angles on their heads, through the great yawning gaps in the Berlin wall. To the west, it seemed, the Delorsian ideal of a frontier-less, supranational Europe was about to be fully and finally realised. To the east, surely, it was only a matter of time before the emergent liberal democracies of the former Soviet empire followed the western powers down the pan-European path.

Two years on, things looked very different. Far from the east importing western universalism, the traffic appeared to be the other way, with Bavaria, Catalonia, Lombardy and Scotland seeking to emulate the emergent separatism of Slovenia, Slovakia and the Baltic states. And instead of being a temporary festivity, the ornaments of new nationhood – all those recomposed national anthems and redesigned banknotes, postage stamps and ceremonial uniforms – were hardening into real statehoods with real borders, inspired not by universal enlightenment values, but by the atavisms of ancient religious and ethnic conflicts. Virtually the first act of any new east European state appeared to be the delegitimisation of their own minorities, be they ethnic Hungarians in Slovakia or ethnic Russians in Latvia.

Language became a particularly important symbol of renewed ethnic divisions, as Croats in particular strove to make their version of Serbo-Croat as distinct as possible from Serbian, inventing new, distinctly Croatian coinages for words like announcement and aeroplane. This phenomenon too was echoed in the west, as Catalan moved from forbidden to compulsory in a generation. While the concept of Europeanness itself had changed from one of inclusion to one of exclusivity, less about who you were than what they weren’t. Travelling through the then Yugoslavia in early 1990, it was clear that, for many of its citizens, Europe was a continent that stopped 20km to the east of wherever one happened to be.

And the separatism and division that emerged as one of the most durable legacies of 1989 has had worrying political consequences, rehabilitating the reputations of interwar dictators like Poland’s Marshal Pilsudski, Slovakia’s Josef Tiso and Hungary’s Admiral Horthy. May’s European elections saw three representatives of Hungary’s neofascist Jobbik party elected to the European parliament. Restricting judicial and media independence, Hungary’s current leader has declared his aim to turn his country into an overtly illiberal state, on the model of Russia and China. In Poland, nearly 30% of electors between 18 and 25 voted for a party whose leader believes that women should be denied the vote.

People celebrating new year 1990 in front of the Brandenburg Gate. Photograph: Wolfgang Kumm/Corbis

The most spectacular far-right victories in May’s elections were, of course, in Britain and France, during which the French Front National positioned itself to the left of the Socialist party on public ownership, Ukip turned to left-behind Labour voters, and both parties – of course – rejected any notion of universal European values. But the new political fault line between a socially liberal, free market urban elite and an increasingly socially conservative but still welfarist working class was first drawn in Ukraine during the 2004 Orange Revolution against a rigged election “won” by Viktor Yanukovych. Earlier this year, the rerun of that uprising saw the fascist Svoboda and Right Sector parties enter the post-revolutionary government. Now, President Petro Poroshenko has announced plans to build a wall along Ukraine’s eastern border with Russia, costing more than 10 times the country’s current defence budget, to be built by the Germans.

Unlike the Arab spring, the velvet revolutions of late 1989 did not see a reimposition of authoritarian rule, and – where democratic processes have been corrupted – people power has reasserted itself in democracy’s defence (as it did in Kiev in February). But the rise of a racist far right across Europe is more than just a predictable cost of an overwhelmingly beneficent change. It represents a clear and present danger to both halves of the continent.

• The Burning Coal Theatre Company’s productions of David Edgar’s Iron Curtain Trilogy – The Shape of the Table, Pentecost and The Prisoner’s Dilemma – is being performed at the Cockpit Theatre from 13 to 30 November 2014.