It’s hard to avoid the common narrative surrounding key individuals in Turkish politics. Recep Tayyip Erdogan is the charismatic strong man using political Islam as a tool to facilitate a shift to authoritarianism, while Fetullah Gulen is the reclusive and mysterious adversary plotting from abroad.

Those caricatures help simplify analysis of a complex political system, but the tendency of commentators to focus on individual agency misses many of the variables shaping Turkish politics. Consequently, those wanting to understand what the failed coup means for Turkey should look to the regional security environment for richer descriptions.

It helps to first reassess Turkish security in the historical context of the Kemalism, the dominant state ideology for most of the 20th century. The prevailing historical narrative frames Kemalism as a nationalist project, where Mustafa Kemal Ataturk, the first president of Turkey, implemented a series of reforms following the breakdown of the Ottoman Empire. These were designed to protect ‘Turkishness’ via a mix of militant secularism, republicanism and modernisation.

A security-based assessment of Kemalism uncovers a different story. Here, the foreign policy isolationism of Kemalism made sense in the post-World War I order. Similarly, modernising by linking to European values functioned as an important security currency, as it differentiated Turkey from the states of the Middle East.

That position was justified when Turkey emerged free of hostilities after World War II. More importantly, isolationism allowed it to avoid the security competitions that troubled the Middle Eastern security architecture. Post-1945, Kemalism again helped Turkey to navigate a complex environment effectively, despite being at the frontier of US–Soviet activities.

More recently, this strategic interpretation helps to understand the AKP’s rise in 2002. With the end of the Cold War and the emergence of al-Qaeda, Salafi radicals recast Kemalism as a force that was corrupting Turkish Islam. The rise of radical voices after the US occupation of Iraq made Turkey vulnerable to a range of entrepreneurs who sought to capitalise on the changing regional order. First al-Qaeda, then Daesh, threatened to take their messages across Turkey’s porous southern borders.

Turkey’s shift towards political Islam and away from Kemalism isn’t simply the result of Erdogan and his personal aspiration. Instead, Erdogan’s use of Islamist rhetoric is an instrument for the state to recapture those problematic narratives from radical opportunists.

That reading often gets lost because the political commentary delivered to the West about Turkey comes from progressive voices in Istanbul—which are framed through a European lens. And while genuine and informative, those voices often cast aside the fundamental fact that Turkey remains a highly conservative and religious state, especially outside of its major cities.

Other European voices equate Turkish security as dependent on integration with the West. But even here, Turkey has reasons to be wary. For example, NATO has been ambiguous around its Article 5 commitments when Turkey’s territorial integrity has been threatened, as happened during the Gulf Wars and the recent Syrian Crisis.

In that context, the incentives to stay with the West are less critical than often advertised. And problematically, adhering to the EU’s democratic principles leaves Turkey’s domestic environment open to exploitation in the absence of neat political cleavages by a range of diverse actors, including the Gulenists, hard-line political Islamists, pan-Turkists and the Kurds.

That means Erdogan’s rhetorical shift towards political Islam provides a buffer against the most extreme voices projected into the southeast of the country from Syria and Iraq. At a broader level, the corresponding shift of security policy east also prevents exploitation of their geostrategic position by a range of opportunists, including Russia and the US. For example, Gulenists trying to please Washington have been linked to the downing of a Russian jet on the Turkish border in November 2015.

Consequently, a considered shift east does provide some advantages to Turkish security. While NATO membership is likely to remain a pillar of Turkish strategy, the departure of Turkey from a wider set of European institutional pathways (such as the ECHR and the EU Acquis process), isn’t likely to reduce their military importance given that Ankara remains central to the US’s own regional security interests.

Another prime incentive for Western engagement—trade—is also less important than in previous decades. In fact, Turkey’s economy remains strong despite its lack of EU membership and it sits astride a number of strong and growing trade routes, crossed by Central Asia, China, Iran and Russia.

When viewed together, this suggests that the shift away from Kemalism—to what might be called ‘Erdoganism’—is a broader response to the new security environment, rather than personal ambition or individual agency.

Of course, this interpretation provides little comfort for those currently under detention due to tentative links to Gulen. And it doesn’t excuse the purge of thousands of government employees following the events of 15 July. Instead, it seeks to understand the wider forces at play in a highly complex situation and the thinking that will drive the new, post-coup Turkey.