Iran's Foreign Minister visited the Turkish capital this week amid growing regional rivalry as Ankara seeks to expand its influence from the Caucasus to Central Asia. But the conflict in the Middle East is, for now, providing some common ground.
At a press conference in Ankara on Wednesday, Iranian Foreign Minister Hossein Amir Abdollahian and his Turkish counterpart, Hakan Fidan, jointly condemned Israel for its ongoing assault on Gaza. They also called for a regional conference to end the fighting.
The Israel-Hamas conflict provides a shared interest as Ankara increasingly challenges Iran's regional influence.
"Turkey is trying to connect itself with Central Asia ... it's not a secret. So there is a simmering tension between Turkey and Iran," explains Ilhan Uzgel, an international relations analyst for the Kisa Dalga news portal.
"It's kind of postponed because the attention moved to the Middle East again. But we are going to see it more and more in the years ahead."
Turkish President Recep Tayyip Erdogan is working to strengthen relations with energy-rich Turkmenistan and Kazakhstan.
On Friday, he visited the Kazakh capital, Astana, meeting with Central Asian leaders at a Turkic nations summit.
The visit follows French President Emmanuel Macron's visit to Astana on Wednesday as competition heats up for influence and lucrative contracts.
The Turkish leader also recently mended ties with Saudi Arabia, which is Iran's arch rival.
The Azerbaijan situation
All moves will likely stoke Iranian fears of being encircled by Turkey. Still, it's Turkey's deepening military ties with Azerbaijan – which has close relations with Israel – that is causing the biggest concern.
"In Azerbaijan ... Israel has a very strong influence now in Baku," says Mehmet Ogutcu of the London Energy Club.
"They [Israel] think that this is part of the Israeli containment strategy, which is not wrong. And therefore, I think Turkey and Iran are not on good terms."
In September, Azerbaijan – backed militarily by Turkey – ousted ethnic Armenians from the contested Nagorno-Karabakh enclave. Tehran strongly supports Yerevan, but ahead of Baku's attack, Turkish Foreign Minister Fidan warned Iran to stay out of any conflict.
Azerbaijan's victory is widely seen not only as a loss for Yerevan but also for Tehran, weakening its influence while boosting Israel's foothold in the region.
"Israelis have been cooperating with Azerbaijan to do lots of things in Iran, which has made Tehran furious," explains Soli Ozel of Istanbul's Kadir Has University.
Ozel warns that Azeri President Ilham Aliyev's victory is also stoking Iranian fears about its Azerbaijani minority.
"Iran does have a significant Azeri population ... I am sure they do have nationalist tendencies, and Aliyev today appears as a hero because the Azeris for once won the war," Ozel said.
"I think the Iranians are concerned that the appeal of what Azerbaijani nationalists call northern Azerbaijan may be increasing for their own population, who are unhappy living under their Islamic republic, probably for economic and social reasons."
Common ground ... For now
During last year's nationwide Iranian protests, Aliyev – in a televised address – vowed to protect Azeris both in Azerbaijan and Iran.
Azerbaijan and Iran have recently held military exercises close to their shared border.
Two years ago, Ankara signed an alliance with Baku, committing it to defending Azerbaijan in the event of war.
Pointing to a map of the Caucasus, Mesut Casin, a presidential advisor at Istanbul's Yeditepe University declared: "Iran fought with the Turks more than 16 times."
"The Iranians, if challenged or use force against Azerbaijan, Turkey is ready to support Azerbaijan against Iran. This is absolutely 100 percent determination of Turkey," Casin told RFI.
But Ankara and Tehran have found common ground in uniting to oppose Israel's Gaza assault. For now.
With the Caucasus remaining tense and Erdogan continuing his bid to court Central Asian leaders with his latest visit to Kazakhstan, observers predict bilateral tensions will likely escalate as Iran and Turkey compete for regional influence.