As battles continue on the streets of Egypt, many Egyptians have argued that their country's predicament is unique. With its long history of military rule, a vibrant Islamist movement, and a leadership role in the Arab world, Egypt, they contend, stands alone in its political transition - and must get that transition right for the Arab Spring to truly exact change in the region.
While it is true that Egypt has long been the bellwether of the Middle East, the dilemma it now faces - initial democratic elections that bring to power an elected autocrat, who ignores constitutional liberties - is quite common.
As I detail in my book Democracy in Retreat, many first generation elected leaders in new democracies around the world have gone on to govern as quasi-dictators, which, in turn, has only served to fuel rage of the kind that has recently been seen in Cairo.
Once they take office, these opposition activists turned elected leaders have too often morphed into autocrats, overpowering young democracies, whose institutions are not yet strong enough to restrain powerful officials uninterested in compromise, negotiation and opposition.
It is not hard to see why this first generation of elected leaders has so often regressed.
Holding an opposition movement together in the face of a repressive regime requires a high degree of cohesion, some would even say autocracy.
Unfortunately, elected autocrats are not the only ones to blame for democratic regressions of the kind we are seeing in Egypt.
The middle classes, while convinced they are actually protecting democracy, often seem willing to use virtually any means to topple unpopular presidents and prime ministers.
Nearly half of the military coups d'état launched in the past 20 years around the world enjoyed middle-class support. That same section of society has, in many countries, also turned to the courts to overturn elections, or held violent street protests designed to create so much instability that the government falls.
Unfortunately, by using extra-constitutional means to oust democratically elected leaders, those same people perpetuate a dangerous cycle.
In Thailand, for example, supporters of former prime minister Thaksin Shinawatra, who was ousted in 2006, formed the United Front for Democracy Against Dictatorship, a mass organisation whose members, wearing their trademark red shirts, targeted elite institutions with demonstrations and violent protests in 2009 and 2010.
They held massive protests in the centre of Bangkok that descended into brawls with shopkeepers. The Red Shirts were eventually instrumental in the election of Thaksin's sister, Yingluck, as the current Thai prime minister.
The country, however, remains mired in a dangerously unstable cycle of politics, as violent street protests, judicial interventions, and coups have become legitimised as normal ways to oust elected governments.
Egypt faces a similar risk today. If the government holds another election, and the Muslim Brotherhood is allowed to compete, it is likely to win again. If democracy is not restored, the Brotherhood, like the Red Shirts in Thailand, are likely to copy the tactics of those who deposed Mohammed Morsi.
But breaking this cycle is not impossible. Some young democracies have also managed to prosper. Indonesia, for example, which was nearly torn apart by separatist conflicts, is now a functioning democracy. Whenever and however Egypt tries democracy again, its leaders will need to heed some lessons.
For one, part of the problem in young democracies is not merely that citizens have expectations of greater freedoms, they often have high expectations that democracy will also bring better living standards - expectations that, in many nations, have not been met. Managing those expectations in the early years of an emerging democracy is critical to maintaining public support and preventing "authoritarian nostalgia".
The current global economic slowdown has further damaged faith in democratic government, and this is clearly the case in Egypt. Indeed, the World Movement of Democracies, a global talk shop of democratic governments, has repeatedly warned that economic stagnation is the biggest threat to democracy.
Keeping all sectors of society on side also requires several important steps, which the Muslim Brotherhood mostly ignored.
First, elected leaders must take pains to reassure the middle class and elite business community that they will be committed not only to elections but also to the protection of private property, the rule of law, trade rights and other commercial rights, as well as the rights of minorities, other religious groups, and cultural freedoms.
They can do so while also pursuing relatively progressive economic policies, as long as they win the trust of the middle class that these policies, while designed to reduce extreme poverty, are not highly redistributive.
It is not an easy balance to strike, and of course every potential emerging democracy is different. But from examining democratisation across a range of countries, one can see that there are models of leaders who have pursued progressive, even populist policies while retaining the support of big business and the army.
Nelson Mandela achieved this in the early years of post-apartheid South Africa. In Brazil, Luiz Ignacio Lula da Silva, in his two terms as president, achieved such a balance, and kept the middle class on board, even as he pursued a broad basket of pro-poor policies.
The next elected Egyptian leader would be wise to take a page from Lula's book.
This article appears in full on CFR.org by permission of its original publisher. It was originally available here.