Turkey's cooperation with Iran in Iraq and Syria will likely set new developments in motion across the Middle East

Serious threats against the territorial integrity of Iraq and Syria have been pushing Turkey and Iran closer to each other. Most recently, the fact that Ankara and Tehran responded similarly to Masoud Barzani's independence referendum was identified by various observers as a historic turning point in their relations.

As a matter of fact, President Recep Tayyip Erdoğan traveled to Tehran on Wednesday to attend a meeting of the 4th High-Level Cooperation Council. The two governments signed economic cooperation agreements in a range of areas including tourism, banking, customs and natural gas. During the visit, Erdoğan and his Iranian counterpart focused on increasing their annual trade volume to $30 billion and highlighted the importance of national currencies being used in trade deals. Moreover, the two leaders made important decisions about taking joint steps against the Kurdistan Regional Government's (KRG) referendum and create a framework to manage the deconflicting zones in Syria – which shows that they are looking to work more closely on intelligence and defense.

Clearly, Turkey's cooperation with Iran faces many challenges. The two regional powers have not fought each other since signing the Treaty of Qasr-i Shirin in 1639, but competition takes precedence over cooperation in bilateral relations. A quick glance at Turkey's disagreements with Iran since the Syrian civil war started in 2011 alone would suffice to establish that Ankara and Tehran have been engaged in a fierce competition.

The potential disintegration of Syria and Iraq, which poses a vital threat to both countries, encourages Turkey and Iran to cooperate. Various problems and crises ahead will test their resolve.

First, on northern Iraq: It remains unclear why KRG President Masoud Barzani, an experienced politician, called for an independence referendum that most people considered an act of madness. It is possible to argue that Barzani, who was born in the Republic of Mahabad, was motivated by related political and psychological factors. Perhaps he wanted to realize the dreams of his father, Mullah Mustafa Barzani, or himself. However, my sense is that three factors were particularly important:1- Barzani thought that he could create an independent state before the post-Daesh situation in Syria and Iraq would become clear.

2- He assumed that Israel, Russia and the United States would not turn a blind eye to the KRG's disempowerment.

3- Barzani believed that he could exploit Baghdad's political and military weakness as well as take advantage of existing tensions between Iran and Turkey. The potential embargo, he thought, would inevitably die down unless quick military action was taken against Kirkuk.

The Turkey-Iran cooperation faces two challenges. The first (and structural) problem relates to the difficulty of reconciling Turkish interests with Iran's regionwide expansionism and "accomplishments" in Syria and Iraq – from the Shiite militias to Bashar al-Assad's future and the fight against PKK terrorism. For example, it will be crucial how Iran will contribute to Turkey's military operations against PKK-affiliated Syrian People's Protection Units (YPG) militants. Likewise, it is unclear how the moderate opposition in Syria can be incorporated into any type of transition process in the country – with or without Assad.

The second challenge is related to how other regional players will respond to Turkey's cooperation with Iran. It goes without saying that Israel and Gulf countries will be unsettled by Ankara's rapprochement with Tehran. Concerned about the possibility that the United States will withdraw from Syria and becoming "neighbors" with Iran, Tel Aviv will probably blame Turkey for crippling efforts to contain the Iranians. Washington might become increasingly aware of the same issue. The U.S., which wants to use the PKK against Iran, is likely to accomplish that goal. Under the circumstances, Russia might offer more support to the PKK-YPG – which would be another major problem. It is a well-known fact that the Gulf countries, frustrated with Washington's inability to contain Iran, have turned to Russia for assistance. As such, even Moscow could want to counterbalance the emerging Turkey-Iran bloc.

To cut a long story short, Turkey's cooperation with Iran in Iraq and Syria will likely set new developments in motion across the Middle East.