Turkey on Sunday summoned Iran's envoy to Ankara to demand support in the fight against "terrorism", escalating a rumbling row over Turkey's presence in Iraq, state media reported.
Iran and Turkey are rivals in several parts of the Middle East and Central Asia but both have carried out operations against Kurdish militants in northern Iraq.
Earlier this month, Turkey accused Kurdish militants of killing 12 Turks and an Iraqi who were being held hostage in northern Iraq,
The incident prompted Iranian envoy to Baghdad Iraj Masjedi to warn that Turkish forces should not "pose a threat or violate Iraqi soil".
' We do not accept at all, be it Turkey or any other country, to intervene in Iraq militarily or advance or have a military presence in Iraq,' Masjedi was quoted as saying in an interview broadcast on Saturday.
Turkey's Baghdad envoy Fatih Yildiz quickly hit back, writing on Twitter that Iran's ambassador was ' the last person to lecture Turkey' about respecting Iraq's borders.
Turkish foreign ministry officials summoned Iranian ambassador Mohammad Farazmand and told him Turkey expected Iran to be on its side in the "fight against terrorism", state news agency Anadolu said.
Ministry officials also told the ambassador Turkey "strongly rejected" the envoy's comments, insisting that Ankara always informed relevant parties including Baghdad of its plans to target militants.
Turkey has launched multiple air strikes targeting the Kurdistan Workers' Party (PKK) bases in northern Iraq including the areas of Kandil and Sinjar.
The PKK, which has fought an insurgency against the Turkish state since 1984, is blacklisted as a terrorist organisation by Ankara and its Western allies.
Turkey bombed a mountainous region close to Sinjar last month and Turkish President Recep Tayyip Erdogan has warned Ankara could launch military action to get rid of "terrorists" in the area.
But the Iranian ambassador to Baghdad hit out at Turkey's plans.
' What has Sinjar got to do with Turkey,' he asked. ' Iraqis themselves must resolve this issue.'