Throughout the 1980s and 90s, when many developing countries were in crisis and borrowing money from the International Monetary Fund, waves of protests in those countries became known as the "IMF riots". They were so called because they were sparked by the fund's structural adjustment programmes, which imposed austerity, privatisation and deregulation.

The IMF complained that calling these riots thus was unfair, as it had not caused the crises and was only prescribing a medicine, but this was largely self-serving. Many of the crises had actually been caused by the asset bubbles built up following IMF-recommended financial deregulation. Moreover, those rioters were not just expressing general discontent but reacting against the austerity measures that directly threatened their livelihoods, such as cuts in subsidies to basic commodities such as food and water, and cuts in already meagre welfare payments.

The IMF programme, in other words, met such resistance because its designers had forgotten that behind the numbers they were crunching were real people. These criticisms, as well as the ineffectiveness of its economic programme, became so damaging that the IMF has made a lot of changes in the past decade or so. It has become more cautious in pushing for financial deregulation and austerity programmes, renamed its structural adjustment programmes as poverty reduction programmes, and has even (marginally) increased the voting shares of the developing countries in its decision-making.

Given these recent changes in the IMF, it is ironic to see the European governments inflicting an old-IMF-style programme on their own populations. It is one thing to tell the citizens of some faraway country to go to hell but it is another to do the same to your own citizens, who are supposedly your ultimate sovereigns. Indeed, the European governments are out-IMF-ing the IMF in its austerity drive so much that now the fund itself frequently issues the warning that Europe is going too far, too fast.

The threat to livelihoods has reached such a dimension that renewed bouts of rioting are now rocking Greece, Spain and even the usually quieter Portugal. In the case of Spain, its national integrity is threatened by the separatist demand made by the Catalan nationalists, who think the austerity policy is unfairly reducing the region's autonomy.

Even if these and other European countries (for other countries have not been free of protests against austerity programmes, such as Britain's university fees riot and the protests by Italy's "recession widows") survive this social unrest through a mixture of heavy-handed policing and political delaying tactics, recent events raise a very serious question about the nature of European politics.

What has been happening in Europe – and indeed the US in a more muted and dispersed form – is nothing short of a complete rewriting of the implicit social contracts that have existed since the end of the second world war. In these contracts, renewed legitimacy was bestowed on the capitalist system, once totally discredited following the great depression. In return it provided a welfare state that guarantees minimum provision for all those burdens that most citizens have to contend with throughout their lives – childcare, education, health, unemployment, disability and old age.

Of course there is nothing sacrosanct about any of the details of these social contracts. Indeed, the contracts have been modified on the margins all the time. However, the rewriting in many European countries is an unprecedented one. It is not simply that the scope and the speed of the cuts are unusually large. It is more that the rewriting is being done through the back door.

Instead of it being explicitly cast as a rewriting of the social contract, changing people's entitlements and changing the way the society establishes its legitimacy, the dismembering of the welfare state is presented as a technocratic exercise of "balancing the books". Democracy is neutered in the process and the protests against the cuts are dismissed. The description of the externally imposed Greek and Italian governments as "technocratic" is the ultimate proof of the attempt to make the radical rewriting of the social contract more acceptable by pretending that it isn't really a political change.

The danger is not only that these austerity measures are killing the European economies but also that they threaten the very legitimacy of European democracies – not just directly by threatening the livelihoods of so many people and pushing the economy into a downward spiral, but also indirectly by undermining the legitimacy of the political system through this backdoor rewriting of the social contract. Especially if they are going to have to go through long tunnels of economic difficulties in coming years, and in the context of global shifts in economic power balance and of severe environmental challenges, European countries can ill afford to have the legitimacy of their political systems damaged in this way.