Military coups generally cannot turn back the tide of public opinion, but only delay it.
History teaches that Egypt can overcome its crisis
To an outsider, the appeal of the Egyptian army as a guardian of the nation's identity is hard to fathom. Its pampered place in the national economy, with its budget screened off from civilian oversight, sits uncomfortably with the country's revolutionary atmosphere, not to mention the demands of a rapidly emptying treasury.
Perhaps history has the answer. Egypt was for centuries ruled by foreign military castes, who kept up their numbers by importing new blood from abroad and looked down on the native population. Only in the 1973 war with Israel was the army able to prove Egypt was a martial nation that could plan and fight a war as well as any other.
The army now faces an even stiffer test: to meet its promise to restore constitutional order after deposing the Muslim Brotherhood president, Mohammed Morsi.
Its "soft coup" was rapturously welcomed by crowds who not so long ago were chanting for the generals to go back to their barracks. It is bitterly resisted by Mr Morsi's supporters for whom he, not the military, represents legitimacy.
Discussion of how the military might proceed has invited many grim comparisons with the tragic history of Algeria.
In 1991, Algerian generals aborted a general election after the first round when it appeared that the Islamic Salvation Front was going to win a landslide. Despite promises that democracy was about to be restored, the army rounded up leading Islamists, and the country fell into a decade of civil war with up to 200,000 dead. A military-backed government holds power to this day.
Some of the Egyptian military's actions lend credence to predictions of an Algerian scenario. The army has rounded up Muslim Brotherhood leaders, closed down its media outlets and failed to provide any convincing explanation for the shooting of more than 50 protesters.
But still there are strong reasons to believe history will not repeat itself.
Egyptians and all Arab peoples are better informed than in the 1990s and know the cost of violence. Egypt has no history of civil war, unlike Algeria which was shaped by the bloody struggle against French colonial rule. Egyptian Islamists tried armed struggle against the Mubarak regime and abandoned it when it could not succeed, so they are unlikely to try again.
Perhaps the most persuasive reason is that the Muslim Brotherhood is a disciplined force with a long history that ought to be able to absorb the military's blows and survive, unlike the unwieldy Algerian Islamist coalition. It included some of the most radical jihadis flushed with victory in Afghanistan and looking to achieve the same at home.
These arguments are tinged with optimism, and it is too soon to say they are irrefutable. But it is worth looking beyond the Arab parallel to some examples of military coups further afield. These suggest that Algeria is an outlier.
Military coups generally cannot turn back the tide of public opinion, but only delay it. Usually the deposed party or politician comes back, perhaps wiser than before, to take the spoils of victory.
In Turkey, the military stepped in to overturn civilian governments in 1960, 1971, 1980 and 1997. In this last intervention, the generals were defending Mustafa Ataturk's legacy of secularism against the moderate Islamist Welfare Party. Within five years, one of its members, Recep Tayyip Erdogan, having spent four months in jail and founded the Justice and Development Party (AKP), was elected prime minister by a landslide.
In Poland, the last communist leader, Wojciech Jaruzelski, declared martial law in 1991 to crush the independent Solidarity trade union founded by Lech Walesa. Within a decade, Mr Walesa succeeded him as president.
In Pakistan, 14 years after he was deposed and exiled, Nawaz Sharif is back as prime minister. In Venezuela, the charismatic socialist Hugo Chavez was victim of a military coup but he stared the generals down and returned to power. Following his death in March, it is possible that the right-wing opposition may soon return to power.
These examples are not exhaustive but they do tend to show that military intervention, while bloody and repressive, is rarely the end of the political process. Indeed, life goes on. In Poland, Mr Walesa was defeated at the polls in 1995 by a former communist.
The embattled Syrian leader, Bashar Al Assad, has a simple and self-serving analysis of the Egyptian crisis. What is happening in Egypt, he says, is "the fall of what is called political Islam".
If he is right, then the clock will be turned back to the stifling era of the military regimes - such as that of the Assad dynasty - which everyone had thought was buried with the fall of Egypt's former president, Hosni Mubarak, in 2011. In that case, we would have to conclude that the Arab world is insulated by its history, traditions and inter-Arab rivalries from the currents that are shaping politics from Indonesia to Latin America. That seems unlikely.
For the past decade, there has been talk of a "Turkish model" of Islamic democracy. But this is a deceptive term that confuses two distinct phases. It is the latter phase that is generally intended - where a moderately Islamist political creed reconciles Turkey's Islamic roots with some of the European ideals of democracy, to produce a flourishing economy. But that ignores the fact that it took a few years to reach this accommodation during which the army suspended democracy when it felt its interests were under threat.
The idea that Egypt could leap in one bound to 21st century Turkey has proved an illusion. More likely is that the army will hold a veto over future civilian governments for some time to come. These governments must, if there is to be genuine reconciliation, include the Islamists. But it will be a democracy circumscribed by the generals and limited by the harsh reality of Egypt's desperate financial situation.
This is not a perfect result, and probably not what the revolutionary crowds were expecting when they welcomed military intervention. But the Algerian path is infinitely worse.
On Twitter @aphilps