My wife Jill and I were in Warsaw when the Berlin Wall went up in August 1961 and in Moscow when it came down in November 1989. Over nearly three decades the drama of liberation was played out in the capitals of central and eastern Europe, and above all in Moscow, Warsaw, and Berlin.

Many people contributed to the happy and (except in Romania) bloodless outcome. But if one person has to be singled out, it is Mikhail Gorbachev, now despised as a traitor by most of his countrymen and remembered elsewhere – unjustly, by too many people – as an incompetent dreamer, a "liberal" communist who tried but failed to reform the doomed Soviet system.

One can trace the story back to the 1953 rising in East Germany, or to the bloody fighting in Hungary in 1956. For me it begins with another spectacular but now almost forgotten event: the Polish "Spring in October" of 1956. A group of communist nationalists under Wladyslaw Gomulka ousted the Stalinist leadership which had imprisoned him. They expelled the Soviet advisers embedded in almost every Polish government department. When the Soviet leader Nikita Khrushchev flew in from Moscow to sort things out, they told him that the Polish army would fight if need be.

Watch more

Khrushchev pulled back. For a while the Polish experiment was a beacon of comparative freedom in the communist world. In the West they called it "A case history of hope" or "Socialism with a human face". But as we left Warsaw a few weeks after the Wall went up, our liberal Polish friends told us that their reforms could not long survive without fundamental change in Moscow. And indeed reform in Poland petered out as Gomulka turned out to be more communist than nationalist and the Russians sank into a reactionary trance under a succession of ailing gerontocrats, Leonid Brezhnev, Yuri Andropov and Konstantin Chernenko.

But then the Soviet Union began to change in ways which my Polish friends had barely dared to expect. The Soviet Union had achieved military parity with the United States. But outside the military sector, the economy was running down, kept afloat by the export of high priced oil. There were few consumer goods, living conditions were primitive, factories decrepit, agriculture dysfunctional, growth rates approaching zero. In villages outside Moscow and in provincial hospitals there was no piped water. By the mid-1980s people in Moscow were openly saying that "the Bolshevik experiment has failed".

In pictures: Border of Lights - 25th anniversary of Fall of Berlin Wall Show all 7 1 /7 In pictures: Border of Lights - 25th anniversary of Fall of Berlin Wall In pictures: Border of Lights - 25th anniversary of Fall of Berlin Wall Balloon-Corbis.jpg Balloon columns are arranged along the former route of the Berlin Wall at the East-Side-Gallery in Berlin, Germany Corbis In pictures: Border of Lights - 25th anniversary of Fall of Berlin Wall Wall-Corbis.jpg The lanterns are a part of the project 'Lichtgrenze 2014' ('lightborder 2014') on the occasion of the anniversary of the fall of the Berlin Wall Corbis In pictures: Border of Lights - 25th anniversary of Fall of Berlin Wall Berlin.jpg Balloon columns are arranged along the former route of the Berlin Wall near the Oberbaum Bridge in Berlin Corbis In pictures: Border of Lights - 25th anniversary of Fall of Berlin Wall Berlin-Getty.jpg A row of lanterns that are part of the light installation Lichtgrenze (Light border) on the course of the former Berlin wall are pictured next to the television tower in Berlin Getty In pictures: Border of Lights - 25th anniversary of Fall of Berlin Wall 458558820.jpg A man walks past a row of lanterns that are part of the light installation Lichtgrenze (Light border) on the course of the former Berlin wall near the Reichstag building Getty In pictures: Border of Lights - 25th anniversary of Fall of Berlin Wall Border of Lights Thousands of people looking at the balloon lanterns in Berlin EPA In pictures: Border of Lights - 25th anniversary of Fall of Berlin Wall Border of Lights A passersby looks at commemorative crosses for those who died at the Berlin Wall along the Spree River with the Border of Light balloons in the background EPA

The old men in the Politburo were desperate for someone to put things right. In March 1985 they chose Mikhail Gorbachev – young, energetic, imaginative and (they hoped) orthodox – as general secretary of the Soviet Communist Party. Neither they, nor governments and analysts in the West, nor Gorbachev himself, appreciated that he would be the last person ever to hold this post.

Within months he had launched a dizzying programme of reform. His first attempts to kick start the economy were old-fashioned and failed. Politics, not economics, was what he revelled in and was good at. He was determined to change the Soviet system radically – not by abolishing communism, because he always tried to remain true to his roots, but by shaking it to the core, a process he called "perestroika", restructuring. So, in January 1987, he announced that, in future, candidates for senior party posts would be elected from a list, instead of being appointed by a cabal. In summer 1988 he proclaimed that the same principles would apply to parliamentary elections.

The election campaign for the new parliament began in January 1989. It was the real thing. For the first time, reactionaries, liberals, democrats, political outsiders, and the merely ambitious could break into politics without trudging through the party committees. The battles took place at public meetings, in the workplace, in smoke-filled rooms. There were repeated votes, results falsified and challenged: the messy process of democracy, all closely followed by an increasingly curious and outspoken press.

It was not fully fledged democracy, but it was wildly exhilarating; and it was much closer to the real thing than anything that had yet happened in the communist world. The party bosses of Moscow, Leningrad and Kiev were ousted. So were nearly a quarter of the powerful regional party secretaries and most of the military commanders who had previously enjoyed guaranteed seats. The sessions of the new parliament were televised live. People all over the country stopped work to watch Soviet leaders – including Gorbachev himself – being lambasted, the army and the KGB attacked for their brutality, and votes taken whose outcome was entirely unpredictable.

In October 1985 Gorbachev had told the East European leaders they must now take responsibility for their own affairs. The Poles – encouraged by Margaret Thatcher and the Americans – had not let the grass grow under their feet. The anti-communist union Solidarity, suppressed under martial law in 1980, had begun to reassert itself.

But the East European leaders were slow to believe Gorbachev's assurances: they had too many bitter memories of previous Soviet interventions. The Soviet elections were the final demonstration that he meant what he said. The Polish communists had little alternative but to compromise. They negotiated a deal with Solidarity. They organised a national election in June. They were wiped out by Solidarity and its allies. Adam Michnik, a Polish opposition leader, gave due credit: "Were it not for the 'perestroika virus'," he said, "our [democratic movement] could not have got where it is today."

The Polish elections were followed by irresistible popular pressure for change right across eastern Europe: the scrambling departure of thousands of East Germans to the West, the opening of the barriers dividing Hungary from Austria, the tearing down of the Wall in November. At the end of that month The Independent carried a picture of a triumphant placard in Prague's Wenceslas Square. On it was written – movingly, in English – "It's over. The Czechs are free".