An ugly public feud between two key U.S. allies in the fight against the Islamic State will not affect plans for recapturing a key city from the group, a Pentagon spokesman said Wednesday.

Col. John Dorrian, a U.S. military spokesman in Baghdad, played down the effect of this week’s clash between the leaders of Iraq and Turkey, as the U.S. military prepares to assist an Iraqi assault on the city of Mosul, a major objective in defeating the Islamic State.

“Planning for the liberation of Mosul continues,” Dorrian told reporters in a briefing at the Pentagon. “We’re a military organization, and we stay focused on military tasks. So, all the strikes that we’ve been doing, all the training we’ve been doing, all the advising and assisting with things like logistics, all those elements are being put in place to support the Iraqi advance when they’re ready to do it.”

Iraqi Prime Minister Haider al-Abadi is expected to launch an operation in coming weeks aimed at recapturing the northern city, which has been occupied by the Islamic State for more than two years. The Iraqi leader faces an array of challenges in that fight, including thick militant defenses and the problem of managing a diverse force including Iraqi troops, militiamen and foreign advisers. In an additional sign of the complexities in Iraq, there is also a modest Turkish force on a base near Mosul, and its presence has repeatedly been condemned by Abadi.

About 1,500 Turkish troops are believed to be stationed at several locations in northern Iraq, working with local troops, according to U.S. officials

The tensions escalated this week after Turkish leaders affirmed their intention to keep those troops in Iraq until after Mosul, which also includes a sizable Turkmen population, can be recovered, prompting emphatic Iraqi objections.

In a speech Tuesday, Turkish President Recep Tayyip Erdogan said Abadi should “know his place.”

“You are not my interlocutor anyway. You are not on my level, you are not of my quality,” Erdogan said, according to Reuters. “You ranting and raving from Iraq is not of any importance to us.”

Abadi hit back on Twitter, referencing Erdogan’s use of cellphone video technology. During the recent coup attempt in Turkey, Erdogan used a video chat app on a phone to address the nation.

“The day of victory is near,” Abadi’s office said in a statement. “We won’t be discouraged by those who want to deter us from our fundamental goal and thrust us into a media war.”

The dispute is an additional headache for the Obama administration, which is hoping the Mosul operation will deal a decisive blow to the Islamic State in Iraq and set the stage for a final battle in their de facto capital, the Syrian city of Raqqa. Washington has already been seeking to reduce its own tensions with Turkey over U.S. support to Kurdish factions in Syria and over the U.S. response to this summer’s failed coup attempt in Turkey.

Dorrian said there were diplomatic efforts underway to smooth things over between Ankara and Baghdad.