In April 2011, senior members of Turkey’s Justice and Development Party (AKP) met in Ankara to discuss the unrest in Syria. The meeting focused on Syria and how the government should respond to Bashar al-Assad’s violent suppression of antigovernment demonstrations. For the AKP, the unrest posed a unique set of challenges. Since 2002, Turkey had prioritized good relations with Damascus, arguing that areas of northern Syria were part of what they called Turkey’s “natural hinterland.”

In the end, the meeting’s participants decided to cautiously support Assad, albeit while prodding him to make political concessions to allow the exiled Syrian Muslim Brotherhood to reenter Syrian politics. Unlike during the Arab Spring protests in Egypt, when Turkey called on President Hosni Mubarak to step down after only eight days of rallies, Ankara’s initial preference in Syria was for the regime to reform and remain in power. To this end, Recep Tayyip Erdogan—then prime minister and now president—dispatched two trusted advisers to try to convince Assad to make cosmetic democratic reforms to appease the protesters. In April 2011, he sent Intelligence Chief Hakan Fidan to try to convince Assad to deescalate the unfolding crisis. Thereafter, he dispatched Ahmet Davutoglu, foreign minister at the time and now prime minister, on numerous occasions. Despite these efforts, neither man was successful. In September 2011, Turkey severed ties with the regime and began to take active part in regional efforts to overthrow the Syrian dictator.

Turkey’s initial participation in the war evolved in three stages. First, Ankara allowed for the safe transit of arms and fighters, many of whom were defectors from the Syrian army, to various Syrian provinces. These defectors, who came to be known as the Free Syrian Army (FSA), were given shelter by Turkey, and they were allowed to operate from a special refugee camp just inside Turkey’s border with Syria. (Later, they would be given permission to establish a presence in Turkish border towns.) Second, Ankara was eager to organize an opposition-in-exile and, controversially, sought to empower its favored political party and ally, the Syrian Muslim Brotherhood, as that government. Eventually, this policy helped to fracture the budding rebel alliance. Third, starting in November 2011, Turkey began to advocate for international intervention in Syria. Like France and the Arab governments, Turkey supported the creation of a buffer zone and no-fly zone along pockets of its border with Syria, the establishment of which would require the destruction of Syria’s air defense and military installations.

Ankara envisioned that the rebels would use this safe zone to establish a rival government to that of Assad in Damascus. In turn, this nascent government would secure support from local Syrians by providing services. Eventually, the international community would come to recognize it as the official Syrian government. These efforts proved unsuccessful, owing to U.S. reluctance to intervene militarily and Gulf Arab (with the exception of Qatar) resistance to Turkey’s efforts to empower the Muslim Brotherhood.

Perhaps realizing that its border strategy wasn’t working, beginning in late spring 2012, Turkey’s intelligence agency began to organize a rebel offensive against the city of Aleppo. As part of the battle for Aleppo, rebel brigades within the FSA began to rely heavily on Syria’s al Qaeda affiliate Jabhat al-Nusra to carry out suicide attacks on Syrian regime–held checkpoints. To support these efforts, Turkey and Qatar eventually reached out directly to al-Nusra, believing that the rebel group would be useful in achieving its ultimate goal: the overthrow of Assad. Turkey also believed that it could potentially moderate the group and that al-Nusra would be good to work with as a “Syrian group” fighting against the regime for the future of all Syrians.

That is, al-Nusra would be a good counterbalance to the Kurdish Democratic Union Party (PYD) in the Kurdish-majority areas in northern Syria. The PYD has links to the Kurdistan Workers’ Party (PKK), which has fought a bloody insurgency against the Turkish state since 1984. So it was bad news for Turkey when, in July 2012, Assad withdrew all but a handful of military forces from three Kurdish-majority areas—Afrin, Kobane, and Jazira—to help bolster his beleaguered forces elsewhere. The PYD soon declared autonomy in all three places, and in response, Turkey reportedly allowed FSA and al-Nusra forces to use its territory to attack the outskirts of Jazira in November 2012. Similarly, in 2014, Turkey allowed al-Nusra and other rebel brigades to use its territory to attack Kasab, an Armenian-majority town in northwestern Syria.

For these reasons, Ankara resisted international efforts to designate al-Nusra as a terrorist group in December 2012. At that time, Turkey was working with the group to solidify its gains in Aleppo, as well as to put pressure on the PYD to drop its demands for autonomy and join the Turkish-supported Syrian National Council. Turkey was able to maintain support for this policy up until early 2014, but under increased U.S. pressure it shifted its and formally designated al-Nusra as a terrorist organization, albeit while still retaining its links to the group.

On the other hand, there is no evidence to suggest that Turkey ever gave support to the Islamic State of Iraq and al-Sham (ISIS), once its leader, Abu Bakr al-Baghdadi, split from al-Nusra in 2013. Even so, there is no denying that Ankara indirectly aided the group while its members fought under the banner of al-Nusra and by allowing foreign fighters to transit its territory to enter Syria.

In fact, ISIS has worked at cross-purposes with Turkey’s interests in Syria. The group has clashed with Turkish-backed rebels throughout northern Syria, and Turkey’s military action near Aleppo has aided the Assad regime’s assault on the city. Turkey believes that ISIS is symbiotic with the Assad regime. The AKP argues that Assad’s brutality sustains popular support for ISIS. In tandem, ISIS helps the Assad regime maintain the façade that it is fighting terrorism.

To address this relationship, Turkey has called on the international community to target Assad and finally force him from power. By doing so, the factors that sustain ISIS will be eliminated. That would allow for a more coherent Syrian opposition to emerge and, eventually, assume power in Damascus. This understanding of the conflict suggests that the overthrow of Assad would also result in Turkey’s lessening of support for al-Nusra.

Until then, Turkey still appears willing to cooperate with the group in the hope that its success will eventually lead to its replacement by a more moderate set of leaders who appeal to a much broader segment of Syrian society.