A row erupted between Iranian and Turkish ambassadors to Iraq over statements calling on one another to respect the sovereignty of the country.
Since the US-led invasion that toppled Saddam Hussein, Iran and Turkey have been heavily involved in Iraq's internal affairs.
Iran has been training, funding and arming Shiite militias, while expanding its influence over political groups in Iraq.
Similarly, Turkey has intensified military operations in Iraqi territory to chase down Kurdish insurgents, despite objections from the Iraqi government.
"We reject military intervention in Iraq and Turkish forces should not pose a threat or violate Iraqi soil," Iran's ambassador to Iraq, Iraj Masjedi, told Kurdish media outlet Rudaw on Saturday.
“The security of the Iraqi area should be maintained by Iraqi forces and [Kurdistan] Region forces in their area.
“We do not accept at all, be it Turkey or any other country to intervene in Iraq militarily or have a military presence in Iraq.
"Therefore, we believe the Turks must return to their international position and be stationed there, and the security of Iraq be maintained by Iraqis."
The Turkish ambassador to Iraq, Fatih Yildiz, responded using Twitter.
“The ambassador of Iran would be the last person to lecture Turkey about respecting borders of Iraq," he said.
The statements prompted a response from the Speaker of the Iraqi Parliament, Mohammed Al Halbousi, who urged foreign diplomats to focus on their role as representatives of their countries.
"The duty of the representatives of diplomatic missions in Iraq is to represent their countries and enhance bilateral co-operation," he said.
“Some of those representatives have to realise this very well, and not to meddle and to respect the sovereignty of Iraq in order not to be treated the same."
Since 1984, Ankara has been fighting the Kurdistan Workers' Party, or PKK, in south-east Turkey along the border with Iraq. The group maintains bases in the northern part of Iraq, prompting Turkish forces to launch air strikes and ground offensives.
The PKK is considered a terrorist group by the EU and US.
The weakness of Iraq's successive governments and political infighting since 2003 allowed Turkey to widen its operations, establishing new outposts deep inside Iraqi territory.
Baghdad protested against the operations through diplomatic channels, considering them to breach the country's sovereignty, but those efforts have had little effect.
Meanwhile, Iran-backed militias have been attacking US assets in Iraq in a bid to force American troops out of the country after the assassination of Iranian Quds Force commander Qassem Suleimani in early 2020.
Widespread protests broke out in 2019 in central and southern Iraq against interference from Iran and Turkey.
Protesters demanded that Tehran and other foreign governments respect Iraq’s sovereignty.