Two waves of popular protests against Islamist regimes, one in Turkey and the other in Egypt, have produced notably different outcomes.  Prime Minister Recep Tayyip Erdogan has weathered the storm, while President Mohamed Morsi was removed from office by the military.  In view of the similarities between Erdogan’s AKP (Justice and Development Party) and Morsi’s Muslim Brotherhood, and the latter’s stated intent to follow the Turkish model of a secular state’s gradual transformation into an Islamic republic, it might be fruitful to compare and contrast recent developments in the two most populous Muslim countries in the greater Middle East.

In the early days of unrest, street protests in Turkey were compared in the Western media with the misnamed Arab Spring.  The comparison itself was inaccurate: No regime change was in the cards, no foreign money and logistics were in evidence, and apart from a few hot spots in Istanbul, Ankara, and a few other cities, life in Turkey went on as usual.  The government remained firmly in control of the state apparatus, the police proved obedient, and the army—already purged of hundreds of senior officers and no longer a significant political factor—stayed in the barracks.

Erdogan is safe because the Turkish army has been neutralized as a political force in its own right.  Even in the midst of mass demonstrations in Istanbul’s Taksim Square last June, the government escalated its continuing clampdown on the army’s top brass by approving an indictment under which 102 retired officers (76 of whom are already in prison) will be tried for their role in the military coup of 1997.  Right now there are 450 active and retired officers accused of either toppling former governments or making plans to unseat the current one.

The strong performance of the Turkish economy over the past decade is another key factor working in Erdogan’s favor.  The majority of Turks are in broad agreement with Erdogan’s dual policy of desecularization of the state and capitalist growth of the economy.  That growth has been impressive, although there is a discrepancy between the Islamic stamp Erdogan has imposed on the country’s cultural and political scene and the widening gap between Turkey’s haves and have-nots.  The AKP-connected new oligarchs, similar to their uncouth Russian and Eastern European counterparts, are Erdogan’s creation.  Thanks to their party affiliations they have profited from massive government-financed construction projects—like the proposed redevelopment at Taksim that triggered the protests.  Nevertheless, Turkey’s prosperity has produced an impressive level of social stability and reduced the potential for regime change.

Erdogan has enemies within his own camp, but they are by no means hell-bent on his removal.  There are many Turks of an Islamist persuasion—both within and outside the AKP—who have not been averse to the drift away from secularism at home and the assertive pursuit of neo-Ottomanism abroad, but who believe that the power of “the Sultan” (as Erdogan is known among his friends and foes alike) needs to be curtailed.  They do not identify, however, with the values and aspirations of the secular and liberal urban middle class, which has been the backbone of protests.  A broad anti-Erdogan front transcending religious lines was never a possibility—unlike in Egypt, where the Salafist Nour party joined Morsi’s enemies.

Morsi’s downfall weakens Erdogan’s standing in the Arab world.  Having been vocal in demands for Morsi’s reinstatement, the Turkish leader will find it hard to finesse relations with the new team in Cairo.  His open support for Hamas in the Palestinian Authority is seen by Egypt’s generals as destabilizing and dangerous.  His advocacy of the Syrian rebels is odious to both AKP supporters and Kemalists.  By overplaying his hand on Morsi, Hamas, and Syria, Erdogan has dashed his chances of leading an Islamic Greater Middle East.  Foreign minister Ahmet Davutoglu’s policy of “zero problems with all neighbors” has failed, not only in Syria, but also vis-à-vis Iraq and Iran, both of which support Bashar.

A powerful Sunni imam, Fethullah Gülen, may yet decide Erdogan’s political future.  Little-known in the West—although he has lived in self-imposed exile in rural Pennsylvania for years—he controls a global empire of media outlets (including Turkey’s top-circulation daily), charities, businesses, and schools.  Gülen’s religiously based movement is described as Turkey’s third power, alongside Erdogan’s increasingly authoritarian AKP and the decreasingly influential military.  Gülen now feels strong enough to engineer a comeuppance for Erdogan that will not disrupt the regime while increasing the power of his followers.  The secularists have been marginalized.  Thanks to Erdogan’s patience in transforming the Kemalist legacy gradually, different forms of political Islam will dominate Turkey’s political discourse for many years to come.

In Egypt, by contrast, Morsi tried to do too much too soon.  He and the Muslim Brotherhood acted as if they alone had toppled Mubarak, and as if they alone had the mandate to create a new, Islamic Egypt.  In reality, it was the military that brought down Mubarak in February 2011, and the generals have continued to control the key levers of power, not least in the field of economy and finances.  It took Erdogan over eight years, from early 2002 until September 2010, to weaken the Turkish officer corps, change the constitution, and establish full political control.  Morsi imagined he could pull it off by retiring Marshal Tantawi, and he was proved wrong.

In the aftermath of July 3, the generals have acted with impressive speed, appointing a senior judge as interim president and forming a cabinet composed largely of liberals, reformist-minded economists, and technocrats.  It includes no members of Morsi’s Muslim Brotherhood—which refused to take part in what it called a military government—or of the other leading Islamist party, Nour.  The generals have promised a swift transition back to civilian rule, but their ability to accomplish that is uncertain.  The Arab world’s most populous country is deeply divided, and the Muslim Brotherhood now rejects the legitimacy of the process itself.  It would make little sense for the military to arrange speedy elections only to be forced into yet another intervention a year later.

Egypt’s future will hinge on the generals’ ability to fine-tune the transitional process.  It is important to note that Morsi’s removal from power was not a reflection of their dislike of Islamism per se but the result of the Brotherhood’s attempt to monopolize all power, coupled with the Brotherhood’s gross economic and social mismanagement.  The army intervened because the stability of the state was threatened, and Egypt’s generals have a vested interest in maintaining the order that guarantees their enormous economic privileges.  Their quarrel with Morsi, in short, was not ideological.  Support from Saudi Arabia and the Emirates for Abdel Fatah Al-Sissi’s coup is a sign that those regimes do not expect the new government to reimpose the secular-nationalist agenda that characterized the Nasser-Sadat-Mubarak decades.

Western liberals lament that Morsi’s overthrow has been “disastrous” for the prospects of democracy in the Muslim world, but those prospects had always been nil.  The Irish Times notion that Egypt has “mutated from poster boy for free elections to a ballot-failed nation” is ridiculous: Morsi’s victory in the presidential election in June 2012 was marked by serious irregularities that have never been properly investigated, and he wantonly abused power during his year in office.  All opposition was crudely demonized, and the Mubarak-era oppressive apparatus was retooled to serve the Brotherhood.  Last November Morsi issued a decree granting him dictatorial authority, including immunity from any judicial oversight.  In December he staged a bogus referendum that rubber-stamped a new, sharia-based constitution, which was drafted by the Muslim Brotherhood-dominated Shura Council with Salafist support.  The rhetoric of “democracy” was used by Morsi in line with Erdogan’s dictum that “democracy is a train: you can get off when you reach your destination.”  Morsi’s desired destination was always crystal clear: ikhwanat al-daula, the Ikhwanization of the state.

Egypt’s problems are staggering.  She has few natural resources.  Her situation is considered “critical” by Foreign Policy’s “Failed States Index,” on par with Mauritania, Sierra Leone, and Burkina Faso.  The country of 85 million undereducated people has to import most of its food.  A quarter of Egypt’s population is unemployed; among the young—the majority—that figure is estimated to be over 50 percent.  Two fifths of her people survive on two dollars per day; a quarter on one.  The tourist industry, the only reliable source of foreign exchange under Mubarak, has collapsed.  In 2011 Egypt’s GDP grew by a measly 1.8 percent, as did her population.  In June 1979 the population of Egypt was 41 million, and it has more than doubled since.  The share of investments in GDP declined from 21 percent in 2011 to 13 percent last year.  Some three million Egyptian workers in the oil-rich Persian Gulf states provide a key source of revenue, but their status is uncertain.  If Egypt is forced to reabsorb some or most of them in the years to come, the perfect-storm scenario will be complete.

Occasional injections of foreign liquidity can only postpone the disaster.  A long-term solution demands fundamental restructuring, primarily in agriculture, which requires political stability.  This is possible only with the generals firmly overseeing a government of appointed experts for many years to come.  This may be Egypt’s only chance to rebuild investor confidence and avoid mass starvation and civil war.

For now, Turkey remains political Islam’s great white hope.  Erdogan’s systematic dismantling of Mustafa Kemal’s legacy has produced a model of sorts—but one that cannot easily be replicated elsewhere in the Muslim world.  Turkey is relatively stable and prosperous thanks in large part to seven decades of Kemalist secularism.

The American interest requires staying away from the Middle Eastern minefield.  U.S. Secretary of State John Kerry said on July 17 that it was “too early to judge” the future course of Egypt following the ouster of Mohamed Morsi.  “Very clearly order needs to be restored to the streets, stability needs to be restored, violence needs to be ended, rights need to be protected . . . and the country needs to be able to return to normal business,” Kerry told a press conference in Amman, Jordan.

Platitudinous inanities of this sort are preferable to grand schemes and bold visions.  Compared with Hillary Clinton, Kerry is a fairly decent chief diplomat.