This week is the first anniversary of the failed coup against Turkey’s President Recep Tayyip Erdoğan, a coup he has used since to further alienate his opponents. Most recently, on 16 April, he won a referendum to become head of state and head of government simultaneously, emerging as the most unassailable Turkish politician since Mustafa Kemal Atatürk established the secular republic in 1923.

In the 1920s and 1930s, Atatürk shaped Turkey in his own image as a western society. In his Turkey, the state banished religion to the private sphere and discriminated against pious citizens. But since 2003, Erdoğan has dismantled Atatürk’s societal model, flooding political and education systems with rigidly conservative Islam, as well as pivoting Turkey away from Europe and the west.

This is, paradoxically, Erdoğan’s Atatürk side. Of course, Erdoğan does not share his values, just his methods. Just as Atatürk reshaped Turkey, so Erdoğan is building a new country, but one that sees itself as profoundly Islamist in politics and foreign policy – to make it a great power once again.

Erdoğan is an anti-Atatürk Atatürk. As I explain in my book The New Sultan, having grown up in secularist Turkey and faced social exclusion at a young age because of his piety, Erdoğan is motivated by animosity towards Atatürk’s ways. Yet he has dismantled Atatürk’s system by using the very tools that the country’s founding elites provided: state institutions and top-down social engineering.

Erdoğan has used the founder’s means and methods to replace even Atatürk himself. The end product is that Turkey now discriminates against citizens who do not first and foremost identify through conservative political Islamism, the branch to which Erdoğan belongs. However, Erdoğan has a problem: whereas Atatürk came to power as a military general, the president has a democratic mandate to govern. And what is more, Turkey is split almost down the middle – Erdogan won the April referendum with only 51% popular support.

Despite this, Erdoğan wants to change Turkey in his own image in the way that Atatürk did and herein lies the crisis of modern Turkey: half of the country embraces Erdoğan’s brand of politics, but the other half vehemently opposes it. So long as Turkey is genuinely democratic, Erdoğan cannot continue to govern the way he likes to.

This has given birth to Erdoğan’s dark, illiberal side: in order to push forward with his platform of revolutionary change against a split society, he has been cracking down on his opponents and locking up dissidents. Although he has won elections democratically, Erdoğan has gradually become more autocratic, ensuring, once he has won an election, that the political playing field is uneven in order to prevent power from escaping his hands.

Accordingly, although Turkey’s elections continue to be free, they are increasingly not fair. Erdoğan’s electoral strategy has created deeply entrenched polarisation in Turkey: his conservative base, constituting about half of the country, has zealously rallied around him in his defence; the other half resents him.

Last year’s failed coup only sharpened Turkey’s dilemma. Although the initial post-coup purges and arrests targeted members of the conservative Gülen movement – erstwhile allies who seem to have turned against him in the coup – Erdoğan has since cast a wide net, arresting anyone who opposes him. He has jailed 40,000 people since the coup, purging another 150,000. His opponents now loathe him.

But Erdoğan does not seem to take notice. On 18 May, he declared that the state of emergency put in place after the 2016 coup would be extended until there is “welfare and peace in the country”. He has even threatened to detain Kemal Kilicdaroğlu, head of the main opposition Republican People’s Party (CHP), who is currently leading a march from Ankara to Istanbul to protest against Erdoğan’s ongoing crackdown. Erdoğan knows that he cannot continue to govern Turkey the way he likes so long as it is a democracy – which is why he is now taking steps to end democracy.

Soner Cagaptay is a senior fellow at the Washington Institute for Near East Policy and author of The New Sultan: Erdoğan and the Crisis of Modern Turkey