The flap over the presence of Turkish troops in northern Iraq, which the government in Baghdad objects to because the forces are there without its permission, could undermine recent gains in the fight against the terror group and disrupt the upcoming effort to retake Mosul.
"It is imperative for all parties to coordinate closely over the coming days and weeks to ensure unity of effort in defeating Daesh and to provide for the lasting security of the Iraqi people," State Department spokesman John Kirby said in a statement issued Tuesday, using another name for ISIS. Kirby however did not mention Turkey by name saying he was addressing "the role that international forces will play in the Iraqi operation to liberate Mosul."
The statement comes as tensions have increased between Turkey and Iraq amid ratcheted rhetoric from the leaders of both countries.
Turkish President Recep Tayyip Erdogan insisted Tuesday that Turkish troops would take part in the Mosul offensive whatever the views of the government in Baghdad.
Erdogan said Turkey would act inside Iraq and Syria on its own terms. "We do not need to take permission for this, we are not planning to get it," he told a conference in Istanbul.
The Turkish leader also slammed Iraq's Prime Minister Haider Abadi for raising his opposition to the contingent of Turkish soldiers, telling him "You should know your level."
For his part Abadi rebuked Erdogan in a post on Twitter, saying "we are not your enemy and we will liberate our land through the determination of our men and not by video calls" -- an apparent mocking reference to the attempted July coup in Turkey, when Erdogan appeared on Turkish television via a FaceTime video call claiming he was still in charge.
The Pentagon has also echoed the State Department's calls to focus on ISIS and to not let the current row distract from that fight.
"We call on both governments to focus on their common enemy: ISIL," Pentagon spokesman Matthew Allen told CNN, using the government's preferred acronym for the terror group. "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."
A US defense official told CNN that 1,000 Turkish soldiers are stationed in Bashiqa in Nineveh province, northeast of the ISIS held-city of Mosul, the terror group's most important bastion in Iraq.
The area is close to the ISIS frontlines and Turkish troops recently repelled an ISIS attack on the Turkish installation. The soldiers are there to train Kurdish and Arab fighters as part of an "understanding," in the words of the US defense official, between Ankara and the semi-autonomous Kurdish Regional Government in northern Iraq.
While the Turkish government is locked in a decades-long battle with Kurdish separatists in Turkey and considers Kurdish groups in Syria to be terrorists, Turkey enjoys a close economic and political relationship with the Kurdistan Regional Government in Iraq, a semi-autonomous body that has welcomed the Turkish forces despite Baghdad's opposition.
Though Baghdad shares the Turkish and Kurdish goal of freeing Mosul from ISIS, it has long been wary of the Kurds and foreign powers exercising too much control and influence in northern Iraq, which could undermine the central government's authority and even increase the potential for secession.
In the short term, the Turkish presence could exacerbate strains between Baghdad and Kurdistan just as US officials have said that collaboration between them is essential to the Mosul fight.
The US defense official said that Turkey has recently increased its training efforts in Bashiqa in anticipation of the Mosul offensive. He said that the uptick likely contributed to the latest round of protest from Baghdad.
It also came after Erdogan declared his country couldn't be excluded from the Mosul offensive and the parliament renewed its approval of troops in Iraq and Syria.
Last week, Iraq's cabinet condemned Erdogan's statement as a blatant interference in Iraqi affairs and an attempt to stir up sedition, after the Iraqi government slammed Turkey for having "poisoned" relations with "futile statements."
The campaign to reclaim Mosul, Iraq's second-largest city, could begin as early as this month, and it's expected to be tough. Anything that makes the task harder for the US and its allies concerns US officials.
"We now have all the pieces in place," Brett McGurk, America's special presidential envoy for the fight against ISIS, told reporters at the State Department Friday.
But US officials acknowledge that creating the 30,000-strong force preparing to recapture Mosul has involved a lot of negotiations, as it comprises a wide array of groups, with the Kurdish Peshmerga and Iraqi army making up the bulk of the force. Iraqi security forces are leading the ground campaign in Iraq, battling ISIS with the backing of US and coalition airstrikes and advisers. The US recently announced the deployment of 600 additional US troops to aid in the city's capture.
"Getting all of these forces together and arranged ... takes an awful lot of work," McGurk said, pointing to more than 100 meetings over three and a half weeks attended by US officials to develop each group's battle plan.
"We worked very hard and had very close cooperation with our partners" in Baghdad and Iraqi Kurdistan "to agree on the overall disposition of forces, where everybody will go, what they will do," he added.
McGurk said there have been similarly intense negotiations among Iraq's political groups about how to stabilize and govern the diverse city should the military campaign against ISIS in Mosul succeed, including which groups will be allowed to govern and police which parts of the city.
Nick Heras, a Middle East researcher at the Center for New American Security in Washington, told CNN that the Iraqi-Turkish dispute could pose "a serious challenge" to efforts to stabilize Mosul because it could lead to various factions vying for control amid what many believe would likely be a major refugee crisis.
Heras added that Baghdad, the Kurds, and Ankara were all vying for influence in Mosul, with the US caught "trying to play referee."
Heras said that Turkey was training some 4,000 Sunni Arab fighters, many of them former local police or low-level Iraqi army soldiers, as part of an effort to influence the political situation in Mosul following its liberation from ISIS. The government in Baghdad is ruled by a majority Shiite coalition, while the denizens of Mosul are largely Sunni.
The Iraqi Kurds and Turkish government are allies because "neither believe that Baghdad will have the ability to govern Mosul after ISIS," Heras said, and they want to ensure that the area remains stable rather than give rise to another terrorist or insurgent movement.
Heras added that Turkey has managed to extend a considerable amount of sway over the Kurdistan Regional Government in Erbil.
The US has not taken a firm position on the presence of Turkish troops in Iraq and has declined to rebuke Turkey publicly for its unauthorized troop presence. Despite the risks they pose to the Mosul mission and the integrity of a unified Iraq, the US is working closely with Turkey, its long-time NATO ally, in the ongoing effort to drive ISIS out of the Syria-Turkish border region in northern Syria.
Addressing the Turkey-Iraq strain, McGurk stressed the importance of maintaining the "sovereignty and territorial integrity of Iraq," adding that, "All military activities in Iraq have to be with the full consent and coordination of the government of Iraq."
This sentiment was echoed in the statement issued Tuesday, although that statement by Kirby did not mention Turkey by name.
McGurk attributed the row over the Turkish presence to "some miscommunication or something" that prevented Turkey from gaining the consent of the Iraqi government for Turkish troops deploying in the north when the units arrived a year ago.
But McGurk also welcomed the Turkish-trained forces joining the fight against ISIS in Mosul.
"They have trained a number of local Nineveh fighters and we are prepared to incorporate those fighters into the operation under the Iraqi command," he added.
Ankara and Baghdad summoned each other's ambassadors Wednesday after escalating rhetoric from both governments. The Foreign Ministry in Baghdad said the Turkish envoy had been called in because of "provocative statements" by Turkey. Iraq has vowed to formally protest the Turkish presence at the UN.
The US has said the dispute needs to be worked out bilaterally between the two allies.
"This is an issue for the government of Turkey and the government of Iraq to speak to," Pentagon Press Secretary Peter Cook told reporters Thursday in Washington.
A US defense official told CNN that the US takes no position on the legality of the Turkish presence in Iraq, with another official adding, "We are monitoring the situation closely."