It’s not easy to be a dictator when you’ve been a member of NATO since 1952, part of the Council of Europe in 1949, which is now the European Union, and a major strategic ally of the United States—first during the Cold War and now in the war against ISIS. For many months, Erdogan declined to join the coalition fighting the terrorists, and Turkey was considered a nominal ally in the war against terror.

Then, last summer, Turkey joined the U.S. led campaign against ISIS. As a result, the terror group began targeting Turkey, and the U.S. government last September authorized the voluntary departure of 900 family members of personnel stationed at Incirlik air base and the U.S. consulate in Adana. On March 29, all U.S. military families in southern Turkey were evacuated.

Last summer also witnessed the end of a ceasefire between the Turkish government and the Kurdish separatists. Yet Turkey’s current problems are not to be blamed on security issues only. They are the results of Erdogan’s national security and foreign policy decisions. Despite its strategic location, Erdogan’s decisions have reduced Turkey’s status in the world arena.

Erdogan has a master plan—as a diehard Islamist, he wants to revive the glory of the Ottoman Empire, restore Islamic rule, and purge the country of undesirables—especially the Kurds. Turkey considers the Kurds (whether Turkish Kurds, Syrian Kurds, or Iraqi Kurds) the main threat to Turkish national security. The Kurds want autonomy, and independence is viewed as endangering Turkey’s sovereign unity. Turkey has anxiously observed the gains Syrian Kurds achieved over the last few years. For Turkey, ISIS is the lesser of two evils compared to the Kurds.

Turkey has maintained a backdoor channel with ISIS for years. This channel helped secure the release of dozens of Turkish diplomats and drivers who were taken hostage by ISIS when the terror group captured Mosul, Iraq’s second largest city, in June 2014. In return, Turkey released a group of ISIS detained operatives. Turkey also turned a blind eye on ISIS’s oil trade with its southern provinces and on jihadists crossing the Turkish – Syrian borders to join the fight against the Syrian government. Many of them eventually joined ISIS.

Turkey’s alliance with the U.S. led campaign against ISIS came with a price: unleashing a renewed crackdown on its own Kurds. The Kurdish fighters are the best (and the only, in the case of Syria) reliable forces on the ground in the fight against ISIS.

About a month ago, the Syrian government launched a major assault on Aleppo, Syria’s largest city to the north to weaken the rebels and claim their territory. The Syrian Kurds took advantage of the government campaign to expand their area of control in order to connect a Kurdish pocket in northwest Syria with the rest of the Kurdish territories in northern Syria by the Turkish border. The Syrian Kurds tried to control a strategic town called Azaz, located 25 miles to the north on the supply line to Aleppo.

That gave Turkey the incentive they needed to launch an air attack on the Syrian Kurds to prevent them from capturing the city. Turkey’s shelling of the Syrian Kurds was condemned by most of the world, including the United States and the United Nations’ Security Council. Moreover, Turkey arranged for hundreds of Syrian Sunni Arab fighters to cross its border to Turkey then come back to Syria from another border center, to the town of Azaz, to join the fight against the Kurds. The Turkish bombardment of the Kurds has jeopardized the U.S.-led coalition against ISIS in Syria because the Kurds then began looking for support from the Syrian government and even from Russia.

The Iraqi Kurdish forces have recently regained ground around Mosul with the help of US air strikes. Yet, last December, a Turkish army battalion was deployed to the north of Mosul over the protests of the Iraqi government, the United States, and the United Nations. Iraq also threatened to fight the Turkish invaders. The Americans publicly said that the Turkish deployment was not part of the US-led coalition against ISIS. None of these actions could persuade the Turks to back off.

Turkey claimed that its forces in northern Iraq protected the Iraqi Sunni forces from attacks launched by ISIS. But Turkey’s interests in Iraq are similar to its interests in Syria. The Turkish government wants to make sure that the Kurds will not expand their territories in the Arab Sunni regions or the Turkmen areas. Turkey also wants assurance that it will have a say in Mosul’s political structure after the liberation. This week, ISIS and Turkey have exchanged artillery bombardment in the Mosul area. On Tuesday, an Iraqi politician from Mosul accused Turkey of shelling Mosul indiscriminately.

Erdogan and Ottoman Dreams

For a number of years, the Turkish president Erdogan was viewed as an able diplomat who built a bridge between the Islamic world and the West. Yet the longer his tenure, the more frustrating his policies were for his people, the Middle East and the world. Somewhere during his years in power, he had a dream: he envisioned himself as an Ottoman Sultan, able to control the Middle East from Baghdad to Casablanca. The problem is that no one has awakened him from the dream.

Erdogan has engaged in a regional conflict with Egypt and Saudi Arabia for crushing the Muslim Brotherhood in Egypt, yet he did not hesitate to silence the protests in his own country. His country’s relations with Israel, Syria, Iraq and Iran have suffered the consequences of his polices. Turkey’s relations with the U.S. have suffered as well. President Obama said recently that he was disappointed with Erdogan’s leadership. Erdogan has assumed applause would follow, rather than the long line of cold shoulders.

Erdogan has compromised his country, now in crisis with itself and the rest of the world. Despite its hopes of manipulating geopolitics to its own favor, Turkey’s fashioned role as an outlier with an independent agenda has caused the region and the world to think the Ottoman Empire is a bad dream best left between the covers of history books.

An Iraqi multimedia investigative journalist who covered the Iraq war, corruption and ISIS for The New York Times, The Los Angeles Times, and Mashable, he also served as a communication coordinator for the Iraqi Ministry of Justice.