Turkish Premier Recep Tayyip Erdogan was one of the most vociferous critics of the overthrow of Egyptian president Mohamed Morsi. He and Morsi were cut from the same Islamist cloth and both steadily began a phased anti-military purge. Erdogan, however, enjoyed a long head start, whereas wary generals, who saw the handwriting on the wall in Ankara, stopped latecomer Morsi in his tracks.Not long after Morsi was deposed on July 3, the drawn-out Turkish saga reached its climax when former chief of staff Gen. Ilker Basbug was sentenced to life imprisonment for his role in an alleged conspiracy to topple Erdogan.Basbug was not alone. Nearly 300 people were prosecuted, including prominent politicians and journalists.Three serving opposition parliamentarians from the Republican People’s Party were sent up for between 12 and 35 years each.Superficially, this can be presented as a victory for democracy, just as the same superficiality portrays the Egyptian upheaval as a blow against democracy.US President Barack Obama toes this line. He gave unstinting support to Erdogan over the years, despite his excesses, not only as the people’s choice but as a prime example of the ostensible compatibility of Islamic religiosity and democracy. For these same reasons Obama boosted Morsi. Europe followed suit with unconcealed alacrity.Too bad the leaders of the Free World did not understand what President Shimon Peres said back in 1980, after the Turkish generals’ last attempt to seize power and impose their will (for the third time since 1960).Peres pointed out then that Turkey debunks the accepted wisdom that the military is anti-democratic. In Turkey’s case, Peres argued, the military is democracy’s guardian.Over the decades since modern Turkey’s founding father, Mustafa Kemal Ataturk, rescued his country from Ottoman decay, it was Turkey’s military that defended his progressive constitution and prevented the reemergence of Muslim clerical domination.This might not have created a liberal democracy in Western terms, but it built a bulwark against reaction and hence became the lesser of likely evils. The same happened in Egypt, where the army stood behind every ruler from Gamal Abdel Nasser to Hosni Mubarak.Obama didn’t get it in Turkey. He misread Egypt so badly that he abandoned Mubarak and ushered in Muslim Brotherhood hegemony.But the big picture that eluded Obama was not misunderstood in Cairo and Ankara. Egypt’s beleaguered generals did not fail to draw operative conclusions from what was happening to their Turkish counterparts, while Erdogan instantly comprehended what Morsi’s ouster signified. Erdogan lashed out vehemently against Egypt’s military leaders, not least because they preempted the prospect of them ending up like his opponents.Erdogan managed a piecemeal transformation whose cumulative effects are becoming increasingly intolerable to secular upwardly mobile Turks. The return to Islamic garb for women, which Ataturk forbade, the compulsory Koran classes in schools, restrictions on alcohol sales and even bans on bright lipstick for Turkish airlines stewardesses, all add up.“Insulting Islam” has become a punishable crime in courts controlled by the government. Erdogan’s party, which rose on a strident anti-corruption campaign, is perceived as more corrupt than its predecessors. The Erdogan personality cult – exemplified in his omnipresent portraits – exacerbates the antipathy, as do his vituperative outbursts, of the sort he has frequently aimed at Israel, but which also proliferate against domestic targets.The pugnacious Erdogan now aims to run for president, since he cannot continue for another term as prime minister. Accordingly, he aims to change the rules of the game and make the presidency more potent.Those urban Turks who are relatively Europeanized have cause for concern.As Peres opined all those years ago, the Middle East demolishes clichés. In this region liberal secularists put their trust in the military, whereas the forces of Islam are its hardly democratic adversaries. Chipping away at the military hierarchy – to say nothing of eliminating it – bolsters the fundamentalists and brings theocracy ever closer.No alternative is democratic, but the West – Israel included – needs to decide with whom it would rather do business, or with whom it can do business.