As Turkey begins its attacks against the Islamic State in Syria, President Recep Tayyip Erdoğan is making the same mistake regarding Syrian Kurds that his country made regarding Iraqi Kurds. His threat in late June that “we will prevent, at all costs, the emergence of a state in the north of Syria” is the same kind of threat Turkey used to voice against the Kurds in Northern Iraq during the first decade of the 21st century. Yet Turkish companies have literally been building the Kurdish Regional Government (KRG), and it is difficult to imagine a situation in which the cooperation between Turkey and the KRG will cease to exist.

Turkey’s airstrikes against targets of the Islamic State (IS) in Syria are a significant change of policy. Turkey’s more assertive stance followed a terrorist attack in the Turkish town of Suruç on July 20 that killed 32 people. The Turkish government claims the Islamic State (IS) is behind the attack, and the attack was directed mainly against Turkish Kurds, who try to assist their ethnic brethren struggle against IS in Syria.

For more than a year, Turkey has been stuck between a rock and a hard place regarding Northern Syria. If it supports the Syrian Kurdish Forces (YPG), the military wing of the Democratic Party Union (PYD), it is supporting an affiliate group of the Kurdistan Workers’ Party (PKK) with which it is now in a renewed hot battle. If it supports IS it risks further alienating the West, and reports that IS is collaborating with Syrian President Bashar al-Assad’s regime, a regime Turkey wants to remove, makes IS an even less desirable partner. Most importantly, as the Suruç terror attack indicates, IS is a growing threat to Turkey. Turkish desperation has led to the perception that a Turkish-controlled safe zone in northwest Syria might be a lesser evil than partnering with the Kurds or IS.

The U.S., which gives the YPG air support against IS, will have to continue to be careful with its handlings of the group as to not to upset Turkey too much. It should try to achieve the level of understanding both states had, for example, in 2007 and 2008 with regard to Turkish concerns over PKK operations from Northern Iraq. President Barack Obama’s phone conversation with Erdoğan on July 22, in which the Turks agreed the Americans could use the Incirlik base in southern Turkey for the struggle against IS, is evidence that this is feasible.

Similarities in the Turkish contribution to the rise of the KRG and the Syrian Kurdish autonomy are striking. Turkey’s pressures during the First Gulf War led to the creation of the no-fly zone over Northern Iraq that laid the foundation for the KRG, and Turkish threats against the al-Assad regime strengthened the Syrian Kurds. While Turkey may hope that moderate Syrian opposition groups or the Turkmen minority will take control on ground of the safe zone it wants to establish, it is unlikely that this will succeed, thereby making the Kurds once again the most reliable possible future partner. In a poll conducted between July 7 and 12, a majority of Turks said they prefer the PYD controlling the areas adjunct to the Turkey-Syria border rather than the Islamic state.

There are, of course, differences between the situation in Northern Iraq and Northern Syria. While Northern Iraq was an operating ground for the PKK, the PKK was not in control of the government there. In contrast, the PYD has political control over the Kurds in northern Syria, and the Syrian Kurdish autonomy seems to be more fragile than the one in Northern Iraq is. Oil reserves in Northern Syria are much smaller compared to those in Northern Iraq.

Any discussion of Turkish position towards the Kurds in Syria should take into account the domestic arena. The difficulties in forming a new government in Turkey following the June 7 parliamentary elections have made the possibility of snap elections more plausible. Clearly, Erdoğan and members of the Justice and Development Party (AKP) think that adopting a strong anti-Kurdish stance will help it regain the necessary votes to form a government on its own. Yet, after a government will be formed, much of the same impetus that brought AKP to start the peace process with the Kurds three years ago will reemerge.

Given the AKP’s domestic considerations, it might take Turkey several years to fully understand that it has to live with the growing Kurdish assertiveness on its Syrian border and that it should use its leverage to create a sphere of influence over Northern Syria (in addition to its sway in Northern Iraq). Turkey will eventually accept Kurdish control. If there is one thing that Turkey fears more than the strengthening of the Kurds or Islamic extremism, it is chronic instability on its border.