Just a few short years ago, Turkey was heralded as one of the region’s rising powers

It wasn’t long ago that Turkish foreign policy was the talk of the town. Defined by the catchy phrase of “zero problems with the neighbors,” Turkey aimed to both improve relations with its neighborhood and slowly emerge as the dominant regional power. It was a classic case of enhancing soft power through democratization and economic reforms at home, coupled with shrewd diplomacy aimed at establishing Ankara as a mediator in the region’s conflicts.This policy lies in ruins today.

It is the victim of the unpredictable turnabout in the Arab Spring, especially in Syria; hubris; and miscalculations in domestic and foreign policy. With the exception of the Kurdistan Regional Government in northern Iraq, Turkey’s relations with almost all of its neighbors have soured. At the same time, tensions with the United States, European Union, and Russia have all dramatically increased.

If Ankara has any sway today, it is mostly because of its geography — which gives it proximity to Syria and the refugee calamity — and its willingness to use strong-arm tactics in diplomatic transactions.So how did Turkey’s international ambitions fall apart? It’s a question with multiple answers.

President Recep Tayyip Erdogan’s grandiose ideas of his role in the world, his desire to transform Turkey into a strong presidential system, and the collapse of the Kurdish peace process, itself a casualty of the Syrian crisis, all have contributed to damaging Ankara’s once-promising foreign policy.Turkey and the Arab SpringEven before the Arab Spring, there were signs that Turkish foreign policy was faltering. In 2009, after almost seven years of conservative rule, Turkey’s accomplishments were noteworthy: rapid economic growth, the transformation of Istanbul into an international hub, democratization at home, and the domestication of the powerful military establishment. Erdogan’s Justice and Development Party (AKP) went from electoral victory to electoral victory, as ordinary citizens were seduced by his accomplishments and turned off by a hapless

opposition.Having consolidated his position at home, especially after the 2007 elections, Erdogan became more of a risk-taker. He initiated a calculated public showdown with Israeli President Shimon Peres at the 2009 World Economic Forum, in which he angrily castigated Israel’s policy in Gaza, which threw relations between the two countries into a tailspin. However, it also paid off tremendous dividends in the Arab world, as Erdogan and Turkey’s popularity skyrocketed, and Arabs flocked to Turkey for tourism and in search of investment opportunities.

This was followed by a pro-AKP Turkish NGO’s decision to charter a boat and sail to challenge the Israeli blockade of Gaza and the disastrous Israeli response, which ended with the deaths of nine Turks and saw relations with Israel collapse further.The advent of the Arab Spring also pushed the United States and Turkey to work together closely. They appeared to synchronize their public statements on Egyptian President Hosni Mubarak in an effort to push him out and later worked together on supplying arms and supplies to the Free Syrian Army.

Turkey once again emerged as a regional model country that had successfully married Islam and democracy in the person of Erdogan and his AKP. As early as 2010, Obama declared Turkey to be a “great Muslim democracy” and “a critically important model for other Muslim countries in the region”; in 2012, he even named Erdogan among the top five leaders with whom he had forged a close relationship.Turkey, however, wanted to be more than a model. The rise in Egypt, Tunisia, and Syria of the Muslim Brotherhood, with which the AKP leadership had had close relations, opened the possibility of an active role for Ankara as the movement’s most powerful regional ally. The Arab Spring in effect allowed for the Turkish leadership to imagine itself as the region’s leading power: As then-Foreign Minister Ahmet Davutoglu put it, Turkey “will lead the winds of change in the Middle East … not just as a friend but as a country which is seen as one articulating the ideas of change and of the new order.”Turkey’s moment had arrived. But it wouldn’t last long: Davutoglu’s hoped-for “new order” was dealt a setback when Egypt’s Muslim Brotherhood-led government was overthrown by a combination of public protests and the army, and Erdogan’s relations with the new military-led regime disintegrated rapidly. But it was in Syria, where Bashar al-Assad’s regime stubbornly persisted in the face of an insurgency that Turkey helped support, where Turkish foreign-policy objectives were ultimately upended.How Syria changed everythingBefore the 2011 uprising, Syria had been the ultimate successful example of Turkey’s “zero problems” foreign policy. Soon after the AKP’s rise to power, Syrian strongman Bashar al-Assad and Erdogan established a close working and even personal relationship.

This was a remarkable turnabout, considering that in 1998, Turkey threatened Syria militarily due to its support of the Kurdistan Workers’ Party (PKK), which was then waging an insurgency against the Turkish state. Erdogan helped launch indirect negotiations between Israel and Syria, and went on to support the Baathist regime against a U.N. effort, led by the United States and France, to pressure Syrian troops to leave Lebanon.When the peaceful protests started in Syria, Erdogan at first maneuvered to prevent Assad from succumbing to the same fate as the Egyptian and Tunisian leaders. He counseled Assad to introduce reforms — in fact, he reportedly suggested that these did not have to be very profound — but to no avail. As Assad gave a free rein to his military to crush the protests, Erdogan turned on his former ally and friend.

A number of factors contributed to Erdogan’s decision: anger that Assad would not heed his counsel, the common perception that Assad would not survive anyway, the belief that he could shape the new Syria, and finally the dramatic escalation of violence during the holy month of Ramadan in 2011 on what Erdogan saw as Sunni protestors. He called for Assad’s removal and publicly proclaimed that the Syrian dictator had only months left in power. Soon, he said in September 2012, “we will be going to Damascus and pray freely with our brothers at the Ummayad Mosque.”Assad, however, would not fall so easily. The divergence between Erdogan’s wishes to see Assad replaced by a friendly Sunni-based alliance and the reality of the Syrian dictator’s stubborn hold on power frustrated the Turkish leader and pushed him toward a go-it-alone policy. Deep splits started to emerge with the United States, as Erdogan expressed disappointment in Obama’s unwillingness to enter the fray despite massive civilian casualties at the hand of regime forces.Erdogan’s break with Assad also heralded the beginning of a sectarian Sunni policy that became more pronounced as the Syrian regime endured.

Turkey’s policy of encouraging foreign fighters to flow across its border into northern Syria has also helped radicalize the opposition and has raised tensions with Ankara’s U.S. and European partners. The Turkish government knew that many of these foreign fighters would join jihadi militias, such as the al Qaeda-affiliated al-Nusra Front, but allowed them to do so because the homegrown “moderate” rebels had proved unsuccessful in bringing about the demise of the Assad regime. Jihadi fighters, some of whom were battle-hardened and more willing to die for the cause, would presumably complete the task that other Syrian rebels could not.

The unintended consequences of tens of thousands of foreign fighters converging on Syria soon became apparent. Many of the foreign fighters gravitated toward the Islamic State, helping it become the power it is today. In May 2013, during a visit to Washington, Obama urged Erdogan to stop supporting jihadi elements, specifically al-Nusra Front, and prevent their access through the Turkish border. But by then, a jihadi infrastructure within Turkey had materialized that bedevils Turkish security officials to this day.The prime beneficiary of the loose border controls has been the Islamic State. The infrastructure in Turkey that developed to support the jihadis would ultimately be used to strike against Turkish towns, starting with Diyarbakir, Suruc, Ankara, and lastly Istanbul. The first three bombings targeted Kurds and leftists, leaving more than 135 dead, and the last attack in Istanbul’s tourism district killed 11 German tourists.

The Islamic State has also executed its Syrian opponents inside Turkey with impunity and set up exchanges for Syrians and others to ransom their loved ones held by the Islamic State on Turkish soil.The Kurdish QuestionThe empowerment of the Syrian Kurds has been the most important consequence of Syria’s spiral into chaos. Disenfranchised and repressed by successive Syrian regimes, the Kurds were able to take advantage of the country’s fracturing to lay claim to territory where they constituted a majority. They soon found a powerful ally in the United States:

When the Islamic State advanced on the Kurdish-held town of Kobani in October 2014, the U.S. Air Force pounded the jihadi group, launching an extraordinary and successful relationship that has proved to be the most successful effort at dislodging the Islamic State from territory it has conquered.But this deepening alliance came at the expense of the Turkish government. The dominant Syrian Kurdish movement, the Democratic Union Party (PYD), is a close ally if not a subsidiary organization of the PKK, which trained and nurtured it, making it into a formidable fighting force. Washington has made it clear that it distinguishes between the PKK and the PYD, despite the umbilical relationship between these two organizations. From a legal perspective, while the PKK is on the U.S. terrorism list, the PYD is not — and has been the recipient of American military support in its war against the Islamic State.

As the United States has deepened its relationship with the PYD, Washington’s only concession to Ankara has been to give in to Turkish ultimatums not to invite the PYD to participate in recent Syria peace talks in Geneva.In retrospect, the Syrian Kurds’ victory in Kobani proved to be the deathblow for Turkey’s domestic peace process with its Kurdish population. At the time, Erdogan was harshly critical of the American intervention in Kobani as he and his party perceive the PYD to be a greater scourge than the Islamic State. In February 2015, he repudiated the agreement his lieutenants had negotiated with the pro-Kurdish Peoples’ Democratic Party and the PKK. New documents suggest that the breaking point was his fear that Syrian Kurds would duplicate the Iraqi Kurdish experiment of creating an autonomous region on Turkey’s southern border.By last summer, the war by and against the PKK at home had resumed with a vengeance. Since the June 7 election, some 256 security personnel have been killed; the casualties on the side of the PKK, while harder to pin down, have also been high.

The destruction in Kurdish towns such as Silopi, Cizre, and the Sur district of Diyarbakir, where Turkish tanks have fired on homes and the youth wing of the PKK has decided to put up stiff resistance, has also been devastating.Erdogan correctly understood that the Kobani siege represented a possible turning point for the Kurds’ fortunes in the region. He had two choices, co-optation or suppression.

He chose the latter.Even as the Kurds undermined Erdogan’s domestic and international position, the Turkish president found his hands tied even further in Syria by the Russian intervention on behalf of Assad. In a careless move, Turkish fighters in November 2015 shot down a Russian bomber that had briefly intruded into Turkish airspace, an action that triggered a rash of costly economic, political, and military actions in retaliation by Russian President Vladimir Putin. Erdogan had misjudged Putin: The shoot-down was born in the frustrations emanating from his failures in Syria and from watching the Russians and Iranians succeed in bolstering the much-battered Syrian army against Turkey’s allies in the country.The ripple effects from Syria have put Turkey at odds with Iran. From the beginning of the Syrian conflict until the end of 2015, when the Russians intervened directly and the role of Iran’s Quds Force became more obvious, Turkey and Iran had agreed to disagree on this issue. The extensive business ties between Erdogan’s government, including large-scale gold sales, Turkey’s dependence on Iranian gas, and Iran’s need for the foreign exchange revenues created by these exports have helped the two countries avoid a public shouting match.

This is in the process of changing because the confluence of forces on the ground has turned the tide in favor of Assad.Erdogan has not given up on his dream of Turkish influence in the region. Ankara recently announced that Turkey would open up a naval base in Qatar and set up training facilities in Somalia. When convenient, the Turkish president also has proved capable of altering his policies at a moment’s notice — most recently by warming relations with Israel. A rapprochement with Jerusalem opens the lucrative possibility of constructing gas pipelines from the eastern Mediterranean fields through Cyprus to Turkey.What’s next for ErdoganErdogan faces three interlinked challenges. He is relentlessly pursuing a constitutional change that would allow him to centralize executive powers in the presidency, allowing him to run the country unconstrained by its institutions; the escalating conflict with the Kurds threatens to lead to their complete break with the Turkish state; and the deterioration of the Syrian situation promises not only to exacerbate the Kurdish conflict at home but also weaken relations with the United States, as Washington strengthens its ties with the Syrian Kurds.Erdogan may well get his way on some of these issues — particularly the creation of a presidential system — but the price will be even greater divisions within Turkish society, and between Turkey and its traditional allies.

Erdogan is confident that his approach toward the Kurds is succeeding and is banking on the disillusionment of some in the Kurdish community, especially the more pious elements, to turn on the PKK. In the meantime, however, the suffering in Kurdish-majority cities is likely to have an indelible impact on the Kurdish community. Changing international conditions, primarily in Iraq and Syria, suggest that a military victory now may turn out to be a Pyrrhic one.As for Syria, there is clearly a major divergence in priorities between Turkey and the United States and Europe. For Turkey’s Western partners, the No. 1 priority is to defeat the Islamic State — whereas in Ankara, the overthrow of the Assad regime and the prevention of a Kurdish autonomous region in Syria are the overriding concerns.

The continuation of the Kurdish strife at home will further push Ankara away from its allies on Syria.The crux of the matter is this: Turkish foreign policy is no longer about Turkey but about Erdogan. Floundering at home and abroad, the Turkish president has embarked on an illiberal course at home undermining what are admittedly flawed institutions and reconstituting them in his image. His omnipresence and unchallenged position mean that foreign policy is the product of his worldview, whims, and preferences. There is no one who can challenge him. The systematic approach of the early years has given way to indulgence; this more than anything explains the ups and downs of Turkish forign  policy