Istanbul: Diplomatic tensions escalated Tuesday between Turkey and Iran as the countries traded accusations over their roles in the Syria conflict and the Middle East.

The pair have been regional rivals for centuries, but have sought to forge a pragmatic relationship in recent years, with the Islamic republic strongly supporting President Recep Tayyip Erdogan after last year’s failed coup.

But mainly Sunni Turkey and Shiite Iran have been on opposite sides of the conflict in Syria, with Ankara seeking the ouster of President Bashar Al Assad and Tehran, along with Russia, his key backer.

Foreign Minister Mevlut Cavusoglu lashed out at Iran in a speech to the Munich Security Conference at the weekend, saying some of its actions had undermined security in the region and urging Tehran to promote stability.

“Iran wants to make Syria and Iraq Shiite,” he said, quoted by Turkish state media.

Erdogan has also in recent weeks accused Iran of promoting a “Persian nationalism” that had damaged the Middle East.

The Iranian foreign ministry on Monday summoned the Turkish envoy to issue a protest after Cavusoglu’s comments while spokesman Bahram Ghassemi warned that Tehran’s patience “had limits”.

“We hope that such statements are not made again. If our Turkish friends continue with this attitude we will not remain silent,” he added.

Turkey’s foreign ministry spokesman Huseyin Muftuoglu hit back by saying it was “incomprehensible” to receive such accusations from Tehran who he charged with “not hesitating to push into war zones refugees sheltering from regional crises.”

“Instead of accusing countries that have criticised Iran, it should take constructive steps and review its own regional policies.”

The angry exchanges have come just after Erdogan returned from a weeklong tour to the Arabian peninsula, including talks with the leadership of Iran’s arch regional foe and Ankara’s ally Saudi Arabia.

Harmony between Turkey and Iran is crucial in ensuring the preservation of a fragile ceasefire in Syria — also backed by Russia — that came into force at the end of last year as a basis for peace talks.

Although Ankara says Al Assad should go, the government has occasionally softened its stance, indicating the president could have some role in determining the country’s future.

The International Crisis Group (ICG) warned in a report in December that only “by finding common ground” could Turkey and Iran help stabilise the region.

“The alternative — crystallised in the zero-sum dynamic that marks Iran’s relations with ... Saudi Arabia — is even greater disorder and suffering,” it warned.