MOSUL, IRAQ: Turkish troops will remain at a military camp in northern Iraq until Islamic State is driven out of the nearby city of Mosul, Turkey's deputy prime minister said on Wednesday, signaling no respite in a row with Baghdad over the deployment.

The Turkish soldiers are at the Bashiqa camp training Sunni Muslim and Kurdish Peshmerga units which Turkey wants to take part in an expected battle for Mosul. But their presence has sparked a row with the Shi'ite-led government in Baghdad, which is keen that its forces be in the forefront of the offensive.

The United States on Tuesday urged the two governments to resolve the spat, which could affect the planned U.S.-backed assault on Mosul, the headquarters of Islamic State's self-declared caliphate in northern Iraq since 2014.

"Turkey does not move on orders from others ... Turkey’s presence in the Bashiqa camp will remain until Mosul is rid of Daesh," Deputy Prime Minister Numan Kurtulmus told the state-run Anadolu Agency, using an Arabic acronym for Islamic State.

"Whoever the Mosul population is, Arabs or Turkmen, they have lived together for centuries and will continue to do so. If you change the ethnic structure here, the people there will not allow it ... This is our perspective as Turkey. Turkey’s force in the region cannot be questioned," he said.

NATO member Turkey shares a 1,200 km (750-mile) border with Syria and Iraq and faces threats from Islamic State militants in both. But it is concerned that international efforts to destroy the radical Islamists will leave new dangers in their wake.

The Turkish army launched an incursion into Syria in August to push back Islamic State and prevent the U.S.-backed Kurdish YPG militia from seizing ground. Ankara is wary of Washington's support for what it sees as a hostile Syrian Kurdish force.

Kurtulmus said Turkey would participate in the operation to push the jihadists out of Mosul as long as the YPG was not involved. Turkey views the YPG as an extension of the PKK militant group, which has fought a three-decade insurgency in southeastern Turkey and has bases in northern Iraq.