Turkey’s Chief of General Staff Hulusi Akar held talks with senior Iranian leaders in Tehran earlier today to discuss ways of boosting military cooperation between the two countries, the Iranian media reported.

Akar and his Iranian counterpart Mohammad Bagheri announced that the two countries will expand cooperation on counterterrorism and defense issues. They also rejected the latest referendum vote in Iraqi Kurdistan and vowed to work together to preserve Iraq’s territorial integrity.

In a separate meeting with Iranian President Hassan Rouhani, Akar reiterated that Ankara respects territorial integrity of Iraq and Syria and is willing to cooperate more with Tehran to fight terrorism, drugs smuggling, human trafficking and other common threats in the region. Rouhani also hailed the expansion of defense ties between Tehran and Ankara and described the two countries as the pillars stability in the region. “Today, political, economic and international relations between the two countries are good and we should make efforts to ensure that defense and military cooperation between the two countries are also further improved and strengthened,” Rouhani was quoted as saying to the top Turkish military official. “If Iran and Turkey – as two important countries and pillars of stability in the region – are together, they can play a more influential and effective role in regional issues.”

Akar also met with Ali Shamkhani, the secretary of Iran’s Supreme National Security Concil. Shamkhani said cooperation between Iran, Turkey and Russia has helped reduce violence in Syria and undercut American influence in the region. He said the Kurdish referendum undermines the ongoing fight against terrorism and serves the interests of the United States, Israel and Arab countries that support terrorism.

Akar reportedly stressed that Iran, Iraq and Turkey should work closely together to “prevent separatist designs in the region.”

Comment: The high-level Turkish military delegation arrived in Iran just days before President Tayyip Erdogan is scheduled to visit the country to participate in a “bilateral strategic summit” in Tehran.

The Turkish leaders’ visit to Tehran and Bagheri’s trip to Ankara last month are the latest indication that Iran and Turkey are determined to reconcile their differences and find a common ground on regional issues.  During Bagheri’s visit to Ankara last month, the two sides discussed ways to boost bilateral defense ties, coordinate joint counterterrorism efforts and cooperate more in Syria and Iraq. It was the first time that an Iranian military chief visited Turkey since the 1979 Islamic revolution in Iran.

Earlier this month, Ankara, Tehran and Moscow reached an agreement to establish a fourth de-escalation zone in Syria’s Idlib Province – signaling improved cooperation between Tehran and Ankara as the two sides had failed to do in the previous Astana meeting. Turkish Prime Minister Binali Yıldırım said last week that Turkey, Iran and Russia were working on a new de-escalation zone in the northwestern Syrian district of Afrin as well.

Ankara and Tehran also strongly opposed the Iraqi Kurdistan’s move to hold an independence referendum on Monday. Both home to sizable Kurdish minorities, Iran and Turkey fear that a Kurdish state next door would strengthen separatists within their own territories.

Erdogan is also expected to push for joint Iranian-Turkish counterterrorism operations inside the Iraqi Kurdistan against the outlawed Kurdistan Workers Party (P.K.K.) militants and its Iranian affiliate P.J.A.K. – a proposal Tehran has rejected in the past.

The latest steps by the two countries to improve their relations should be seen within changing regional and international contexts. The Islamic Republic believes that it has “defeated” its regional rivals in Syria and Iraq and is therefore willing to work with Ankara to defuse tension and consolidate and sustain its gains.

Turkey, on the other hand, has failed to convince the Trump administration to stop supporting Kurdish forces in northern Syria or take an aggressive approach toward Iranian-backed militia forces in Syria and Iraq. It is no surprise that Turkey is now seeking to address some of its national security concerns in the region through working more closely with Russia and Iran. Ankara has also realized that Syrian opposition forces are no longer in a position to topple Iran’s ally in Damascus.

But the transactional relationship between Tehran and Ankara is unlikely to transform into a strategic alliance anytime soon. The two countries will continue to have divergent policies and interests in the Middle East. Ankara and Tehran will continue to compete for power and influence in Syria and Iraq as the weakening of the Islamic State creates a power vacuum in the region.