Exactly 30 years after the Olympic flame was lit in Sarajevo in 1984, the city was in again in flames. In recent weeks, protesters have stormed government buildings in an explosion of anger over their social situation, rampant poverty, moribund economy, and the stagnant social and political life. When the flame was lit back in 1984 I was seven and lived just across from the Olympic stadium. We could not sleep for two weeks, the flame was that powerful. But, we were at the same time very happy: it was a flame of prosperity, peace and endless possibilities.

Back then Sarajevo was projecting an image of what the European Union wanted its members to become: prosperous, diverse and secular with functioning industries, social equality, enviable social mobility and consistent growth. The European Union, as we now know, has failed to live up to that ambition.

There is another scene from the past too. Ten years after the Olympics, Sarajevo was in ruins, the exact image of what Europe thought it had left behind: a besieged and destroyed city, the victim of resurgent nationalism and sectarianism, Bosnia's landscape dotted with concentration camps and mass graves. Europe watched without doing anything, as if the image it believed to have left for ever in its past was too mesmerising.

And now again, Sarajevo and Bosnia are holding up a mirror to Europe, to its present and to its future. Bosnian cities resemble London in the summer of 2011 and the suburbs of Paris in 2005: an explosion of anger and the anarchic destruction of all symbols of political, social and economic power. Almost 20 years after the Dayton peace agreement, it seems as if local elites and international players have both reached a consensus only on one point: how to rapidly restore capitalism in the country. Yet it is mass privatisation that has led to almost total de-industrialisation and the dependence on imported goods and services financed by the debt slavery of citizens and their weak state.

The result is that ethno-nationalist elites, greatly responsible for war, were rewarded in peace not only by ethnic partition, but also with all the wealth of the territories they control. This was the elite that the international community and the EU, through their marginal politicians sent as "high representatives", treated as their main partners. Citizens were to be kept at bay.

But there is one big difference with the riots seen in other European cities, and this is where Bosnia speaks directly to Europe's current predicament: this is not a rebellion of discriminated and ghettoised groups, territorially contained on the outskirts of big cities. It is a rebellion of the whole population that has been subjected to economic impoverishment, social devastation and political destitution. In this, Bosnia is an image of Europe's future: ungovernable populations, exhausted by austerity measures and left to their own devices after the collapse of remnants of the welfare state – a state with no prospect for growth, run by elites of dubious, if any legitimacy who deploy heavily armed police to protect themselves against ordinary citizens.

However, Bosnia-Herzegovina today sends yet another image. Throughout the country popular assemblies – or plenums – have been established, and an especially laudable example is the Tuzla plenum, which has become so significant that it is now in a position to make appointments to local government. We are talking about ordinary people who are desperate and angry but at the same time determined to struggle for a better life in spite of all the institutional obstacles. They are not merely shouting slogans about what democracy should look like but are putting participatory democracy into practice instead.

Bosnia is showing us scenarios of unrest in other European cities, but also a way out, through the struggle of its citizens for social justice, equality and democracy. In fact, Bosnia is offering an image of what Europe must become in order not to sleepwalk again into a disaster as it did a century ago, when the assassination of Franz Ferdinand in Sarajevo marked the beginning of the first world war. Europe didn't listen then just as it did not follow the image that Sarajevo's Olympic flame was projecting in front of my window in 1984. Will it fail to understand the message Bosnian citizens are sending now? Will Europe engage in putting down this flame only to see it erupting in some other corner of the continent, very soon, when it might be too late?