Turkey on Saturday rebuked Tehran for "offensive language" aimed at President Recep Tayyip Erdogan in connection with a controversial poem that might suggest Iran's northwestern provinces belong to Azerbaijan.
Iran and Turkey have increased economic cooperation over the past decade but remain rivals in several parts of the Middle East and Central Asia.
On Thursday, Erdogan paid a visit to staunch ally Azerbaijan for a military parade marking Baku's victory over Armenia after six weeks of fighting over the disputed Nagorno-Karabakh region.
During his visit, Erdogan recited a poem that Tehran said could fan separatism among Iran's Azeri minority.
Iran is home to a large Azeri community, mainly in northwestern provinces next to Azerbaijan and Armenia, where the Aras river defines the border.
The next day, Iranian Foreign Minister Mohammad Javad Zarif wrote on Twitter that "President Erdogan was not informed that what he ill-recited in Baku refers to the forcible separation of areas north of Aras from Iranian motherland."
According to Iran's ISNA news agency, the poem is "one of the separatist symbols of pan-turkism".
ISNA said the verses point to Aras and "complains of the distance between Azeri-speaking people on the two sides of the river."
Iranian authorities summoned Turkey's ambassador to Tehran to complain about Erdogan's "interventionist and unacceptable remarks".
In return, Turkey summoned Iran's ambassador to Ankara over the "baseless" claims.
Turkey doubled down on Saturday, with a statement by presidential communications director Fahrettin Altun that said: "We condemn the use of offensive language towards our president and our country over the recitation of a poem, whose meaning has been deliberately taken out of context."