Whether the Egyptian army's actions today and over the previous two days amount to a full-scale military coup can be debated. But what is clear beyond doubt is that they amount to a ruinous intervention in the politics of a country that had breathed the air of democracy for the first time for decades.

An army that appeared to be retreating from politics after the departure of Hosni Mubarak in February 2011 has stepped back into the arena again, first by issuing an ultimatum to an elected president to obey it or resign, and then by going through with its threat and laying out a road map that deposes him and suspends the constitution.

Rejecting the results of elections that were widely deemed to be free and fair and setting aside a country's basic law is a step that no army should ever take. The fact that the army's move has been welcomed by many of the revolutionaries who first had the courage to go into the streets against Mubarak in 2011 is a desperate commentary on their political naivety and shortsightedness.

This is not to say that President Mohamed Morsi is blameless. The political charge sheet against him is long and detailed, the worst offence being his issuance last November of high-handed decrees to extend his powers. But he quickly rescinded them after protests. During the latest turmoil on the streets, in spite of his defiant words about being ready to die, he again showed a willingness to compromise by offering to form a government of national unity and accelerate elections to a new parliament. But to make him entirely responsible for the disappointments of the past two years is absurd. It was not he but the supreme administrative court that dissolved the people's assembly, the lower house of parliament. It is not he but the leaders of the opposition parties who produced a government that was largely dominated by the Muslim Brotherhood. Morsi invited them to join the cabinet but they refused.

It certainly isn't the president who should be blamed for the failure of the Egyptian economy to provide enough jobs for tens of thousands of young people who are graduating every year, let alone for an older generation that is out of work. Morsi went along with the International Monetary Fund's plans for an end to subsidies on food and utility prices that would only create more austerity, but so did most of the established opposition leaders who are now clamouring for power. As for the failure of the tourism sector to revive, the main reason for the chaos and instability that put off outsiders rests with the constant street provocations of demonstrators.

Much has rightly been made of the threat to Egyptian democracy that comes from the so-called deep state: the still entrenched bureaucracy made up of officials of Mubarak's National Democratic party, elitist entrepreneurs who were his cronies, and an army hierarchy that exploited state assets or profited from newly privatised industries and trading companies. Some accused Morsi of joining the ranks of this authoritarian elite. But the real charge was that he did too little to challenge them or their footsoldiers, a corrupt and brutal police force. The irony of the events of the past few days is that those who are so energetically denouncing the president in Tahrir Square and the streets of other cities are falling into the trap made by the very elite they want to bring under control.

It is true that the Muslim Brotherhood and its supporters are social conservatives who may pose a threat to some Egyptians' civil rights. But the biggest and most immediate danger to the country is to the political rights that all Egyptians won with the overthrow of Mubarak. The abolition of one-party rule, the right of all kinds of political groups to organise freely, the lifting of media censorship, and the virtual curtailment of imprisonment for dissent are benefits that should not be abandoned lightly.

Those who believe that the military's main objective is to preserve the new freedoms will soon be disappointed. From Chile in 1973 to Pakistan in 1999 (and several times before that), long is the history of military takeovers that were welcomed in their first hours and days but regretted in the years of despair that followed. For Egypt to follow in that tradition is a disaster.