Every major government condemned the coup attempt in Turkey, as did all four of the parties with representatives in the Turkish parliament. So did even Fethullah Gulen, the religious figure accused of being behind the would-be takeover. All this condemnation leaves me feeling a little lonely, having tweeted on Friday, just after the revolt began: "#Erdogan stole the most recent election in #Turkey and rules despotically. He deserves to ousted by a military coup. I hope it succeeds." Having this nearly minority-of-one stance suggests that an explanation longer than 140 characters is in order. Three reasons account for my supporting the ouster of the apparently democratically elected and democratically ruling president, Recep Tayyip Erdogan, by what are apparently the forces of reaction: 1. Erdogan stole the election. Erdogan is an Islamist who initially made his mark, both as mayor of Istanbul and as prime minister of Turkey, by playing by the rules. As time wore on, however, he grew disdainful of those rules, specifically the electoral ones. He monopolized state media, tacitly encouraged physical attacks on opposition members and stole votes. In particular, the most recent national election, held on Nov. 1, 2015, showed many signs of manipulation. 2. Erdogan rules despotically. Erdogan has taken control of one institution after another, even in the two years since he became president, a constitutionally and historically nonpolitical position. The result? An ever-growing portion of Turks are working directly under his control or that of his minions: the prime minister, the cabinet, judges, police, educators, bankers, media owners and business leaders, among others. The military leadership acquiesces to Erdogan's will, but, as the weekend's coup attempt confirmed, the officer corps has remained the one institution still outside his direct control. Erdogan uses his despotic powers to sinister ends, waging what amounts to a civil war against the Kurds of southeastern Turkey, helping the Islamic State group, aggressing against neighbors and promoting Sunni Islamism. 3. Military intervention has previously worked in Turkey. Turkey is the country where military coups have had the most positive effect. In all four of the modern coups (1960, 1971, 1980, 1997), the general staff has shown a disciplined understanding of its role -- to right the ship of state and then get out of its way. Their ruling interludes lasted, respectively, five years, two and a half years, three years, and zero years. Turkey would benefit now from a spell of military readjustment, ending Erdogan's increasingly rogue rule, even if that meant replacing him with more reasonable Islamist figures from his own party, such as Abdullah Gul or Ali Babacan. In the memorable words of Cevik Bir, a leading figure in the 1997 coup: "In Turkey we have a marriage of Islam and democracy. ... The child of this marriage is secularism. Now this child gets sick from time to time. The Turkish Armed Forces is the doctor that saves the child." That child is now very sick and needs its doctor. Sadly, the doctor was stopped this time. One can only imagine how badly the sickness will now spread. We have some idea of how it will look: 6,000 Turks have already been detained, almost 3,000 judges and prosecutors have been fired, and relations with Washington have escalated to near-crisis mode over Erdogan's demand for Gulens extradition. However rocky the past road has been, the future one looks even more harrowing. I renew my prediction that Erdogan's undoing will likely be in foreign affairs. Applying the same bellicosity that works so well in domestic politics to international relations, he will probably meet his at some point when he behaves just too aggressively for his own good. After paying a heavy price, Turkey will be finally be rid of this megalomaniac. Daniel Pipes (DanielPipes.org, @DanielPipes) is the president of the Middle East Forum.