I tried to tackle the question for Foreign Affairs of what happens next in the wake of last weekend’s tumult in Turkey. You can find the article here.

It is hard to overstate the extent to which fears of a military coup have animated Turkish leader Recep Tayyip Erdogan’s actions as a politician. Conservative and religious Turks have lived for decades under the shadow of the 1960 coup that deposed and executed Prime Minister Adnan Menderes, whom Erdogan frequently refers to as a martyred hero and a cautionary tale. The 1997 “postmodern” coup that deposed Erdogan’s political mentor, Prime Minister Necmettin Erbakan, and led to Erdogan’s subsequent imprisonment and suspension from politics for religious incitement only reinforced the notion among non-elite Turks that the old secular establishment, of which the army was the cornerstone, would never fully cede power.

It was only when Erdogan and his Justice and Development Party (AKP) co-founder Abdullah Gül won their 2007 stare-down with the military over Gül’s candidacy for president (which the army opposed because Gül’s wife wore a headscarf), that Erdogan seemed to gain the upper hand and be in position to alter the balance of power with the army for good.

This is the context for the recent Ergenekon and Balyoz trials, in which the government accused Turkish officers of plotting a series of coups and false-flag attacks designed to overthrow the AKP regime—trials that decimated Turkey’s military ranks and that were also subsequently overturned when some of the convictions were found to be based on fabricated evidence.

It is also the context for Erdogan’s fetishization of elections and his majoritarian theory of governance. Both as prime minister and as president, Erdogan repeatedly expressed that elections confer ultimate power and allow the government to take any actions that it likes. Although such attitudes were partly a way of dismissing Turkey’s largely feckless opposition parties, they were also the ultimate line of defense against the military. Erdogan never felt safe from the long arm of the military and always saw the next coup right around the corner. He thus classified every challenge as a plot, whether it came from the military, his former Gülen movement allies, or even from unarmed protestors in Gezi Park.

Erdogan believed that he could get away with such characterizations as long as he could point to high margins of victory on election day and mobilize his supporters in impressive shows of popular strength. These would make it difficult for the military to continue its tradition of intervening in Turkish politics; to overthrow Erdogan and the AKP would be to take on a leader with unprecedented popularity and a party that had been extraordinarily successful.

So it was a surprise on Friday, when tanks rolled through the streets of Istanbul, F-16s flew low over Ankara, and a new entity calling itself the Peace at Home Council announced on Turkish state television that it had taken over the country. Suddenly, it seemed that Erdogan’s worst fears had been realized and that his efforts to coup-proof Turkey had provoked exactly what he was guarding against.

Please head over to Foreign Affairs to read the rest of the piece.