It is humbling to see protesters in Kiev's Independence Square prepared to lay down their lives for freedoms we take for granted. At its simplest, the Ukraine tragedy is a fight for democratic rights at the frontier of autocracy. It is like Beijing's Tiananmen massacre or Caracas's Altamira Square. In the sound of their gunfire, there is the echo of so many through history who fought against oppression: "Freedom or death!"

But Ukraine is also different because it is suffering the rival magnetic pulls of Russia and the European Union. For Russia, the dynastic suzerain of much of Ukraine since 1686, Ukrainian independence is seen as a historic humiliation. Some 17% of the population – thanks to Stalin's gift of the Crimea – are Russian speakers who look to Moscow.

For most Ukrainians, though, the deal with the EU, so peremptorily ditched by President Yanukovych for $15bn of Russian aid, is symbolic of national independence and democratic freedom. From the Orange revolution to today's protests, Ukrainian nationalism sees the EU as its defence.

This is the EU's soft power at work, as it has been in every other central and eastern European state in transition from communism. From Poland through the Baltic states and now to Croatia, EU membership has been the rite of passage that certifies the dark days are over.

The fall of the Berlin Wall in 1989 was the defining political event of a generation. Twenty eight members of the EU – and rising – says this is a club people still want to join. Even the euro-area, despite its well-advertised problems, continues to attract new members: now up to 18 with last year's Latvian accession.

In any other part of the world, some countries as poor as those in central and eastern Europe would have succumbed to Putinism or worse. At best, they might have the appearance of democracy but not its reality of peaceful change of government. But EU membership has thrown a blanket of democratic stability, personal rights and the rule of law over what had been a region notorious for their absence.

Historically, Europe was as prone to the military "men on horseback" as Latin America or Asia. Whether Marshal Pilsudski in Poland or Admiral Horthy in Hungary, there was scant democratic tradition. Poland was poorer than Argentina or Mexico when it signed its Europe agreement in 1994, but is now richer than either and is a vibrant democracy and a leading member of the European family.

That is testament to the example and power of the EU. In an earlier EU enlargement, the same effect was seen in Spain, Portugal and Greece, all dictatorships within living memory. In the aftermath of Franco's death, Spanish generals were invited to Brussels for lessons from their Nato colleagues in how they had to take instruction from elected politicians.

Of course, this marvel did not always work. The former Yugoslavia is a warning of what can happen with excessive EU caution, disunity and lack of generosity. The old ethnic tensions were aggravated by the early recognition by Germany of Slovenia and Croatia as successor states. But when the EU tries, it has proved to be a remarkable douser of old-time nationalist populism.

Vladimir Meciar, the Slovak prime minister who forced the secession of his state from Czechoslovakia, had to put up with a barrage of EU criticism about his attempts to remove the civil rights of the 450,000 Hungarian-speaking population. Slovakia's EU membership would have been blocked had he won the 2002 election, and it is hard to imagine an elected Hungarian government withstanding the pressure to intervene to protect the Hungarian minority in its neighbour. We could have had another Bosnia.

On a continent where the patchwork of language, ethnic and religious groups defied the best attempts to draw rational boundaries in 1919, a fact too easily forgotten by the sea-defined English, the guarantees of both the EU and the European convention on human rights are the only modern and democratic means of drawing the bile from populist resentments. What was once achieved only by Habsburg or Ottoman repression is now achieved by EU-led consent.

The EU is essential for member states who want to project their influence on a global stage, whether in trade talks or climate change. It has its unfinished business, not least internally now with the euro. But it has also proved a miraculous pacifier of a continent traditionally riven by conflict: not just between Germany and France, but across so many smaller linguistic, ethnic and religious divisions.

England and then Britain was involved in every major continental conflict from Tudor times, defending our trading interests and attempting to avoid continental domination by a single power that could close our markets. Generation after generation, we spent blood and treasure. The EU offers the first convincing evidence that the cycle of death and loss has ended.

When we cast our votes in May's European elections, and when we attempt to put a price on every cost and benefit of the EU like the nation of shopkeepers Napoleon once derisively called us, spare a small thought for the EU's advantages that are priceless. The protesters of Kiev are proving that they still matter.

• Chris Huhne responds to readers' comments in the discussion thread below