In theory, Turkey and Iraq face a common enemy in Islamic State, but on Tuesday the Turkish president unleashed his ire on a putative ally, telling the Iraqi prime minister he needs "to know his limits."
Turkish President Recep Tayyip Erdogan railed at Iraqi Prime Minister Haider Abadi, declaring, "You are not my equal and you are not at my level and your shouting in Iraq is not important to us at all."
Erdogan's remarks, which reflect the fragile ties linking those who view Islamic State as a threat, were made during a meeting of the Eurasian Islamic Council in Istanbul, according to Turkey's state-run news agency Anadolu.
Abadi's spokesman, Saad Hadithi, speaking to Sumariyah News, branded Erdogan's statements "irresponsible."
"After the rhetoric of Turkish officials has reached this level … we are convinced that discussions with the Turkish side are no longer useful," Hadithi said.
The verbal fracas is the latest chapter in an escalating war of words between Baghdad and Ankara over the presence of Turkish troops in northern Iraq, further adding tensions to an awkward alliance of armies, security forces and militias aiming to retake Islamic State's de facto capital, the northern Iraqi city of Mosul.
The tensions reflect the different goals of the forces in the area.
Abadi, fearing a backroom deal between Ankara and Iraqi Kurds that would result in Kurdish dominance over Mosul, has rejected any role for Turkish troops in the upcoming campaign.
The Iraqi government, with Iran behind it, wants to reassert its rule via the Mosul battle. That flies against the plans of the Kurds. In the two years since Islamic State's resurgence, they have ousted the jihadists from large swaths of territory they wish to add to an independent Kurdish state.
Turkey, meanwhile, has long fought with Kurds who hope to establish a Kurdish state in Turkish territory.
The key point of contention between Ankara and Baghdad is Bashiqa, a town north of Mosul, where the Turkish army is giving training and weapons to a Sunni militia as part of an agreement worked out with the semiautonomous Kurdish regional government in northern Iraq.
Erdogan said Iraq asked Turkey to establish a base in Bashiqa. "We entered Bashiqa on this basis. But now they say, 'Withdraw from here,'" he said.
"The army of the Turkish Republic has not lost so much prestige so as to take its orders from you. We will continue to do what is necessary, as we have done in the past," he said.
Although it is not part of the U.S.-led coalition against Islamic State, Turkey is one of the Kurdish regional government's top trading partners. The two have also cooperated to ensure that Kurdish separatists, Ankara's bete noire, do not use northern Iraq as a staging area to mount operations in Turkey.
In December, Ankara ramped up its footprint in the area, deploying hundreds of troops and tanks without seeking Baghdad's permission.
Since then, Iraqi leaders have vigorously protested the Turkish troops' presence, describing them in parliament as "occupation forces" and calling on the U.N. Security Council to stop what Iraqi Foreign Ministry officials said were Turkish violations of sovereignty and interference in their internal affairs.
Later on Tuesday, a statement on Abadi's official social media accounts mocked Erdogan's comment about "my equal," sarcastically retorting, "We are definitely not equal to you…. We will liberate our lands with the determination of men and not through Skype." It was a reference to Erdogan using a video calling service to rally supporters during a coup against him in July.
Erdogan's words also spurred a more threatening response from the Popular Mobilization Units (also known as the Hashd al Shaabi), a predominantly Shiite paramilitary force that has played an instrumental role in clawing back territory from the jihadists.
"We the men of Iraq and its Hashd and security forces will have a seismic response which will appear in the battlefield," said a statement by the Popular Mobilization Units' office Tuesday. "Then we will know who should know his limits and whose [face] will be smashed."
U.S. officials, eager to avoid a disruption of the complicated campaign for Mosul, have tried to stop the Turkish and Iraqi leaders from squabbling.
"We call on both governments to focus on their common enemy: ISIL," said Pentagon spokesman Matthew Allen in an interview on CNN. Islamic State is also known as ISIS, ISIL or Daesh.
"It is imperative for all parties over the coming days and weeks to closely coordinate next steps to ensure unity of effort in our counter-ISIL fight."
State Department spokesman John Kirby, meanwhile, said on Tuesday that "all international forces in Iraq should be there with the approval of and coordination with the government of Iraq under the umbrella of the coalition."
Plans are already being formed on how to administer Mosul and the surrounding area when, and if, Islamic State is driven from the city.
But this is another source of tension, though plans call for a committee composed of the province's governor, the provincial council and representatives from the Kurdish regional government, the government of Iraq and the U.S. and United Nations.
Despite the lack of agreement over these plans, U.S. officials have insisted the campaign for Mosul must go ahead.
"It would be impossible to resolve all of these very difficult issues while Daesh is sitting in Mosul," said Brett McGurk, President Obama's envoy to the coalition fighting the Islamic State.
"The problem here is that if you try to resolve all of those issues, Daesh will remain in Mosul for the foreseeable future and perhaps forever," he said.
Bulos is a special correspondent.
Special correspondent Umar Farooq in Istanbul, Turkey, contributed to this report.