The symbolism was huge, as was the message that followed: the highest level talks in almost 40 years between Turkish and Iranian military commanders, then an announcement by Turkey's president of a new "alliance".
After Hulusi Akar and Mohammad Hossein Bagheri met last week, Turkey's President Recep Tayyip Erdogan, who has traded barbs with the Iranian leadership over "sectarian" meddling abroad, suggested the time was right for military cooperation.
It was yet another swift about-face by big players in the Middle East, and one that may have huge implications for the region.
So why now, and how far can such an alliance go?
At the moment we have an agreement to cooperate against the PKK and its offshoots. This is perfectly in line with developments
Huseyin Bagci, Ankara professor
Huseyin Bagci, a professor of international relations at Ankara's Middle East Technical University, told MEE that the developing relationship was based on countering the "Kurdish threat" across the region.
"At the moment, we have an agreement to cooperate against the PKK and its offshoots. This is perfectly in line with developments, especially in Syria and Iraq. It is difficult to say where it will lead to in the future," he said.
Hakki Uygur, deputy director of the IRAM think-tank, which focuses on Iran studies, concurred, saying there is now a growing synergy between the two country's foreign policies. "What we have now is a very short-term and very specific alliance to combat the PKK, YPG and to an extent the issue of the referendum in northern Iraq," he said. "The potential for expanding this alliance is strong though, when regional developments, including the Gulf crisis, are considered."
The Kurdish question
Ankara is alarmed by developments in northern Syria and the gains being made by the Syrian-Kurdish Democratic Union Party (PYD) and its armed wing, the YPG, and especially by the possibility of creating a corridor along the Turkish border through linking cantons under its control.
Turkey views the PYD and YPG as extensions of the PKK, which it has fought for more than 30 years and lists as a terrorist group, as do the US and EU.
Concerns have reached such levels that Ibrahim Karagul, a writer known to reflect the view from the president's palace, wrote in the pro-government Yeni Safak newspaper that Ankara should consider letting the past go and start cooperating with the Bashar al-Assad government in Damascus to tackle the Syrian Kurdish threat.
The ongoing US military support for the YPG, with scant regard for its old ally's most existential concern, has the Ankara government questioning the value of its alliance with Washington, and by association NATO.
Turkey and Iran never identify the other as an enemy
Turkey has also found some success in its efforts to bring a measure of calm to war-torn Syria by working with the Russians and Iranians.
The fallout from Syria's Idlib province, on the Turkish border, also has Ankara concerned. The US wants the province cleared of the now al-Qaeda-dominated rebel forces and is in talks with both Russia and Turkey.
According to Bagci, Turkey indicated a change in its Syria policy after Binali Yildirim became prime minister. And, he said, it is a consequence of that policy change and the Astana process to bring peace to Syria that has led to more proactive engagement with Iran.
"Turkey and Iran never identify the other as an enemy. It is always the word rival instead of enemy that is used. Territorial integrity has become a keyword for both countries, whether it is Iraq or Syria, and is drawing them even closer together," said Bagci.
The most recent tensions began coming to a boil after the Massoud Barzani-dominated Kurdistan Regional Government in neighbouring northern Iraq announced an independence referendum for late September.
Barzani, the least worst option
The Barzani clan is the least repulsive of Kurdish political movements for Erdogan and his government.
The vast trade ties and Islamist conservative nature of Barzani's Kurdistan Democratic Party (KDP) mean a relationship has developed between the two sides, evidenced in the relatively fewer stinging rebukes from Ankara since the referendum was announced.
However, it does not mean Turkey is enamoured in the slightest by even the thought of an independent Kurdish state, considering the potential impact on its own sizeable Kurdish population.
Here, too, like in northern Syria, Ankara holds a grudge against the US. The only intervention thus far has been a telephone call by the US secretary of state, Rex Tillerson, to Barzani.
Ankara has only resorted to that option after the US started supporting the YPG.
- Hakki Uygur, IRAM think tank
Barzani brushed off that conversation in a recent statement saying all he had promised Tillerson in regard to the planned referendum was to communicate more intensively with the central government in Baghdad.
James Mattis, the US defence secretary, also met Barzani on 22 August as part of a regional tour in which he also visited Ankara.
For Iran, Barzani's KDP represents a bigger Kurdish threat. It was Barzani's father, Mustafa, who headed the armed wing of the short-lived Kurdish Mahabad Republic of 1946 in current day Iran's territory.
Tehran is none too fond of the KDP-dominated KRG's close ties with the US in present day Iraq either.
"There is nothing Turkey and Iran can do about this referendum. It is in Barzani's hands," Bagci said. "What are Iran and Turkey going to do. Declare war?"
Erdogan, who also had an audience with the visiting Iranian chief of staff, Mohammed Hossein Bagheri, on 21 August said Tehran and Ankara were discussing joint military operations in northern Iraq and along their own borders against the PKK and its Iranian affiliate PJAK.
This would represent a soft starting point for increased military cooperation in the future. In the past, Iran and Turkey have had limited coordination, if not cooperation, in anti-PKK and PJAK operations.
Breaking points aplenty
The US is unlikely to be pleased to see Turkey, with NATO's second-biggest army, working with a regime it considers its sworn enemy.
The first visit by an Iranian chief of staff since the revolution in 1979 is not the only sign of growing ties between Tehran and Ankara, in spite of the symbolism attached to it.
A major energy deal among Turkish, Iranian and Russian firms was announced on 15 August.
Tehran and Ankara, in recent years, seem to have agreed on a policy of permitting regional bickering but refraining from any domestic criticism, Uygur said.
The Turkish government kept silent in the face of the brutal crushing of the 2009 pro-democracy protests in Iran. Tehran was one of the first governments to voice support for Erdogan's government as a coup attempt was underway last July.
Yet, Erdogan has on two public occasions within the past six months attacked Tehran for engaging in what he termed "Persian nationalism" in the region and of resorting to sectarian policies to advance its expansionist ambitions.
Tehran in turn warned Ankara that its patience was not infinite in the face of such accusations.
The referendum in northern Iraq might be what brings Ankara and Tehran urgently together at the moment, but it is also Iraq that could put an end to any alliance between the two.
Ankara has a long and meaningful relationship with NATO and is not looking for an excuse to end it
Ankara is dismayed to see the growing influence Iran has exerted over Iraq through its Shia connection and irregular military involvement. Barzani's regional government, despite its Kurdishness, is Sunni.
It represents one of the few meaningful avenues left through which Turkey can maintain influence in Iraq.
The ideal situation for Ankara would be if either Tehran or Washington steps in to thwart the referendum process, allowing Turkey to maintain cordial ties with Barzani and its connection to Iraq.
The depth of the US-Turkish alliance is such that while Washington will watch Turkey and Iran with concern, it is unlikely to do so with trepidation for the moment.
Washington still holds the trump card. Ending its military support for the YPG would have a grateful Turkey fully back in its camp, irrespective of other issues affecting the relationship.
"An alliance with Iran is Turkey's plan B and plan C," Uygur said. "Ankara only resorted to that option after the US started supporting the YPG.
"If that were to change, Turkey would go back to its alignment with NATO policies in both Iraq and Syria.
"Ankara has a long and meaningful relationship with NATO and is not looking for an excuse to end it."
The article was first Published Here
Conversations
The opinions expressed in reader contributions are those of the respective author only, and do not reflect the opinions/views of Trans Asia News.