Speaking at a rally in Istanbul on March 26, Turkish President Recep Tayyip Erdogan further escalated his ongoing fight with Europe: “Have you [Europeans] not burned and destroyed my mosques? You are fascists, fascists!”

Erdogan’s creation of alt-facts, wholesale targeting of all Europeans as “fascists,” and bare knuckles fight with European countries, initially appear as part of his strategy to mobilize the right-wing voters in Turkey ahead of the April 16 constitutional referendum. If Erdogan wins this referendum, he will become an all-powerful president with control over three branches of government.

But I think there is something deeper to Erdogan’s anti-European animus. Beyond electoral politics, his incendiary anti-European rhetoric indicates a new phenomenon in Turkey, in which the West has become the enemy.

The roots of this new development lie in the failed coup of last year which led to Turkey’s political pH changed. On July 15 2016, Turkey witnessed two consecutive historic developments: the botched coup attempt to oust Erdogan and the Islamist counter-revolution that blocked the coup. The successful counter-coup did not just save Erdogan, it also placed Islamism, a virulently anti-Western ideology, at the heart of Turkish politics.

As soon as news of the putsch attempt surfaced, Erdogan appeared on FaceTime, appealing to his conservative base to save him. Mobilized by religious calls to help Erdogan being broadcast from Turkey’s 80,000 mosques, thousands of conservative and Islamist Turks took to the streets to block the putschists, going as far as lying under tanks to save Erdogan’s regime. Over 150 Erdogan supporters died that bloody night.

An Islamist counter-revolution unfolded in Turkey during the night of July 15, and though it went unnoticed in the midst of the nefarious coup plot and Erdogan’s ensuing crackdown on the opposition, this counter-revolution has reshaped Turkey since last summer. By allowing forces of political Islam to become hegemonic in Turkish politics, July 15 became Turkey’s Iran 1979 moment.

Erdogan came to power in 2003 as prime minister and head of the ruling Justice and Development Party (AKP), a self-declared moderate movement. But before the AKP, Erdogan got his feet wet in politics in the 1980s and the 1990s in the Islamist Welfare Party (RP), which subscribed to a virulently anti-Western school of political thought known as National Outlook (Milli Gorus).

Born in the Cold War milieu, the National Outlook philosophy depicted the West (the “Judeo-Christian world”) as morally corrupt. National Outlook rejected leftist and rightist political movements as alien, contrasting the “snake oil” of Western thought to the “rich substance” of Islamic ideas. Rejecting capitalism and communism alike, National Outlook espoused a message of national sovereignty and denounced Turks who did not subscribe to this school of thought as “proxies” for foreigners.

According to National Outlook, Turkey’s salvation had to derive from the stock of traditions and ideas that had made the Turks great in past centuries—that is, from “Islam.” Turkey could become a great power again, returning to its Ottoman glory, by breaking away from the West. In the Manichean thinking of National Outlook, the West was an adversary constantly scheming to destabilize Turkey.

Erdogan explicitly rejected political Islam in 2001 when he established the AKP as a moderate force. This has allowed him to pivot to the center of Turkish politics and to win successive elections. Erdogan has also embraced capitalism, paving the way for a period of unprecedented growth in the Turkish economy since 2003.

Unfortunately, the National Outlook has remained a part of his thinking. Until July 2016, Erdogan maintained Turkey’s traditionally strong ties to the West, while simultaneously pursuing the National Outlook dream of making Turkey a Muslim power that defies the West. The 2015 Turkish-EU refugee crisis—in which Erdogan threatened to flood Europe with refugees—is a case in point, as is Turkey’s defiance of U.S. policy by supporting al Qaeda-affiliates, such as Ahrar ul-Sham, in the Syrian civil war.

Since July 2016, that precarious balance between the West and National Outlook has disappeared, and political Islam has become dominant at home and in foreign policy.

While most Turks have a “love-and-hate” relationship with Europe due to a history of conquest, defeat, and osmosis between the Muslim Ottomans and Christian Europeans, Turkish Islamists—whose Weltanschauung has been shaped by National Outlook—have a “hate-and-loathe” relationship with Europe. They not only disdain Europe, like most Turks, but also loathe everything about it.

This explains the new post-July 2016 rhetoric among the AKP elites vis-a-vis Europe, perfectly encapsulated by Erdogan’s declaration that the Dutch and German governments are “Nazis” as a reaction to the ban on AKP rallies in Europe, through which Erdogan had planned to mobilize support among overseas Turks in the April 16 referendum. Since the crisis with the Dutch and the Germans, pro-Erdogan Turkish media has been running articles casting all Europeans as “mired in racism and enmity towards Turkey.”

The counter-coup of July 2016 has unleashed Islamist forces in Turkey to an extent not seen before, bringing National Outlook thought to center stage. Erdogan knows that he owes his life to these forces and will cherish them.

Political Islam has started to dominate domestic policy making as well: a draft educational curriculum circulated by the Ministry of Education for public review in early 2017 described jihad as a “national and spiritual value.”

As Europe and the United States await the April 16 referendum to gauge the future of an important partner, they must also recognize a sad reality, Turkey’s ties to the West are in deep trouble.

Soner Cagaptay is the author of “The New Sultan: Erdogan and the Crisis of Modern Turkey,” out next week.