Erdogan defeated his old rival, but in the process unleashed some radical forces. Here's Adnan Khan on the war of the Islamists

In December 1997, Recep Tayyip Erdogan, the current Turkish president but at the time the mayor of Istanbul, recited a famous poem by Turkish nationalist poet Ziya Gökalp during a speech in the eastern Turkish city of Siirt. One line read:

“The minarets are our bayonets, the domes our helmets, the mosques our barracks, and the faithful our soldiers.”

At a time when Turkey’s strictly secular military still held sway over Turkish politics, the militarized reference to Islam was interpreted as a threat to the secular order established by modern Turkey’s founder, Mustafa Kemal Atatürk. Erdogan was arrested, sentenced to four months in jail and handed a lifetime ban from politics (which was later lifted).

Less than two years later, another Islamist leader in Turkey, Fethullah Gülen, found himself in a similar predicament. In June 1999, he was caught on tape giving a sermon to his followers which appeared to outline a secret long-term plan to take over the levers of power in the country. “You must move in the arteries of the system, without anyone noticing your existence, until you reach all the power centres,” he is reported to have said.

Gülen, who was in the U.S. at the time, was charged in absentia for “attempting to establish an Islamist state.” He remains in self-imposed exile in Pennsylvania.

On July 15, these two Islamist leaders found themselves on opposite sides of a bloody coup attempt. A relationship that had begun on such a similar footing lay shattered alongside Turkey’s democratic order. When it was over, Erdogan had triumphed. The populist leader harnessed the power of faith and an undercurrent of radicalism in a way Gülen could not, nor would have wanted. And in the process, he has pushed Turkey down a dangerous and potentially destructive path.

Erdogan’s poetic call to action finally came to life during the night of the failed coup attempt. Mosques roused the faithful, instructing them to take to the streets. They answered like obedient soldiers, laying down in front of tanks and confronting armed putschists with their bare hands. More than 240 lost their lives. Tens of thousands of Erdogan loyalists occupied Turkey’s squares in the days that followed, chanting religious slogans and vowing to lay down their lives for Islam and their leader. Erdogan meanwhile, laid blame for the coup on Gülen.

At one time, both Erdogan and Gülen shared a dream of a slow and steady Islamist transformation in Turkey. When, in 2002, Erdogan’s AKP stunned Turkey’s political establishment and won the general elections, the Gülenists and Erdoganists merged into a formidable force, working together to purge Turkish institutions of their militantly secular elements. By 2013, the Gülenists had a firm grip on Turkey’s judiciary, police forces and the education system, and they had allegedly infiltrated the mid to lower ranks of the military.

All of that changed when, in December of that year, a corruption scandal erupted based on wiretap recordings of senior AKP officials, including Erdogan, apparently discussing kickbacks in Turkey’s construction industry. One recording allegedly caught Erdogan instructing his son to get rid of millions of dollars in cash stored at the family home.

AKP officials accused Gülenists of orchestrating a massive illegal wiretapping operation targeting Erdogan, who then turned the full force of his government and security apparatus against them. The war between Turkey’s Islamists began.

Gülenists, even those with a marginal connection to the group, are now on the run. The Gülen project is all but finished and in its place Erdogan’s own transformational vision has gained momentum.

But what exactly is that vision? By most accounts, Erdogan is no radical Islamist. Many experts have cautioned against painting him and his inner circle with an ultra-orthodox brush. A more accurate description, they argue, would be to place his party in the same ideological category as the Tea Party in the U.S.: socially conservative nationalists and free-market capitalists who believe they are on a God-given mission to make Turkey great again.

Key to that mission is positioning Turkey as the leader of the Muslim world, and Erdogan as its champion. During the early weeks and months of the Arab Spring, for instance, Erdogan planted the seeds of his aspirations for regional dominance by supporting anti-regime protesters in Egypt, Libya and Syria. His strong support for the Palestinian cause earned him a kind of cult status in the occupied territories.

In the days since the coup attempt, those seeds have borne fruit. “We are proud of what Erdogan has done,” Naseer Kafagi, a 52-year-old Egyptian national and supporter of the Muslim Brotherhood who now lives in the U.K., said. “Erdogan being in this situation is a blessing. He is protected by God. He has given Muslims around the world hope that Muslim countries can do something for themselves.”

The feeling of Muslim empowerment has rippled through Istanbul’s cobblestone streets in the wake of the failed coup. Pakistanis, Syrians and Saudis have marched alongside Turks, chanting slogans and waving their own nations’ flags. Muslim leaders, including Abu Muhammad al-Maqdisi, considered the world’s leading jihadi ideologue, have tweeted their support for Erdogan.

Ominously, the mood in Turkey has created an opening for Salafists like Maqdisi who follow the ultra-orthodox version of Islam most closely linked to violent jihadists. In Istanbul’s conservative Fatih district, followers of Salafism have taken Erdogan’s victory over the Gülenists as a sign to redouble their conversion efforts. For them, Gülen, despite his Islamic credentials, is too close to the U.S. to offer a viable Islamic vanguard. “The Gülenists are like freemasons,” says Muhammed Ender, the manager of Guraba Press, a publishing house owned by Abdullah Yolcu, Turkey’s leading Salafist preacher. “They are dangerous because they look after their own interests and not the interests of Muslims.”

Academics and journalists who have followed Turkey’s religious permutations for decades worry that Salafists, historically a marginal group in Turkey’s theological universe, have now gained a permanent foothold in their country. They point to the exponential rise in religious texts from Saudi Arabia translated into Turkish, many of them at Guraba Press.

“This is a very dangerous situation,” says Niyazi Dalyancı, a member of the board at Turkey’s journalists association. “The ground in Turkey is fertile for these kinds of extremists, and now that ISIS is losing ground in Syria and Iraq, its fighters are coming here. They shave their beards and find safe haven among these Salafis.”

It’s difficult to pin down the numbers of Islamic State and al-Qaeda supporters inside Turkey but they are by no means insignificant. According to the Soufan Group, a strategic security and intelligence company based in the U.S., an estimated 2,100 Turks have joined violent extremist groups in Syria. Their sympathizers inside Turkey are believed to number around six million, based on a November 2015 Pew Research poll. Ultra-conservative Turks have openly demonstrated in support of Jabhat al-Nusra, Syria’s al-Qaeda branch, after U.S.-led coalition airstrikes began targeting it in 2013.

According to those at Guraba Press, al-Qaeda occupies a different space than the Islamic State. Like many ultra-orthodox Muslims, Ender despises ISIS tactics, particularly its penchant for murdering fellow Muslims. He believes the establishment of the so-called “caliphate” is illegitimate because it does not have the endorsement of the global Muslim community. But al-Qaeda, and Osama bin Laden, he says, were correct in their approach. “They realized Muslims are not ready for a caliphate. So instead of establishing one, they focused on freeing Muslims from oppressive regimes,” he says. “Turkey is at an early stage of its Islamic transformation. It’s not ready for sharia. Before there can be sharia, you need to prepare people for it. That is Erdogan’s job.”

Under Erdogan’s rule, Turkey has become a petri dish for Islamist politics. For a time, it seemed his vision for society was not so much Islamist as it was mildly conservative. Over the first few years of its rule, the AKP implemented socially conservative reforms, including placing limits on when alcohol could be sold in corner stores and defunding abortions at state-run hospitals. It tested the public’s appetite for laws based on Islamic values without impinging on the secular foundations of Turkey.

Other, more subtle reforms, however, have alarmed Turkey’s secularists. Under the AKP, religious high schools have flourished while the curricula at secular schools have been increasingly Islamized. Islamic studies programs at universities have shifted emphasis from philosophy to the hard Islamic sciences, including sharia.

Since the onset of the Syrian civil war, Turkey has also made changes to laws that vastly expand the powers of the intelligence service, known by its Turkish acronym, MIT. A series of laws passed in 2014, for instance, have given intelligence operatives the legal cover to carry out operations beyond Turkey’s borders with little oversight, punishing those, including journalists, who attempt to expose the agency’s activities.

Erdogan has argued that the law was needed to shield Turkey’s spies from potential legal action after they engaged in backdoor talks with the PKK, a designated terrorist organization, in 2010. But legal experts warn the law also encourages the MIT to make inroads with other terrorist organizations, like those fighting the Syrian regime.

While no conclusive evidence exists establishing a direct link between Turkish authorities and Islamic State, some experts are baffled by the lack of a strong response to tackle the group’s presence in Turkey. Raids over the past year have netted dozens of alleged Islamic State operatives but they are rarely convicted and more often than not released. “I speculate that the AKP’s soft approach to ISIS is based on an aversion to engaging in a full-scale war against them,” says one academic, who has researched the institutional relationship between Turkey’s government and Islamic State, requesting anonymity. “Certainly ISIS does not represent an institutional structure in Turkey. It is classified as a terrorist organization. But what is written and what is done in practice are not the same things.”

Indeed, Turkey’s host of security challenges has left its security services stretched thin. The renewed war against PKK separatists in the country’s southeast and increasing tensions with Russia pose serious challenges to its military. A spate of bombings claimed by Islamic State, the academic adds, appear to be a message to the Turkish authorities: leave us alone or we will cause havoc on your streets.

Now, as the purges of Turkey’s security institutions continue after the failed coup, institutional chaos is sure to follow. Military experts have warned that Turkey lacks the experienced officers needed to replenish the ranks after such wide, sweeping cull. A detente with Russia, after Erdogan apologized for the downing of a Russian bomber in November 2015, has eased some of the pressure (the fighter pilot who reportedly shot the bomber down was arrested as part of the Gülenist purge) but will do little to help remove the threat posed by Islamic State.

Instead, it appears Turkey is heading toward a Pakistan-style uneasy truce with the growing army of radicals in its midst. Erdogan may have been speaking metaphorically when he recited that poem in 1997, but his words may come back to haunt him.

Read more Maclean’s, news and politics on Texture. Anytime. Anywhere. All in one app.