ANKARA (Reuters) - A planned U.S.-backed operation to drive Islamic State from the Iraqi city of Mosul could cause "blood and fire" in the region if not carefully handled, Turkey warned on Wednesday, saying it would keep troops nearby despite Baghdad's opposition.
President Tayyip Erdogan said Turkey, locked in an escalating row with Iraq over who should take part in the planned Mosul assault, would do all it could to prevent the operation from deepening sectarian conflict on its borders.
Mosul, home to up to 1.5 million people, has been the headquarters of Islamic State's self-declared caliphate in northern Iraq since 2014. The battle for the city, expected later this month, will help shape the future of Iraq and the legacy of U.S. President Barack Obama.
"We will use all our resources to prevent our brothers in Syria and Iraq from being crushed under the wheels of global power games, and to keep us from suffering a similar fate," Erdogan said in a speech in Istanbul.
"We are determined to deflate the balloon of sectarian conflict aimed at drowning the region in blood and fire."
Soldiers from Turkey, a regional power with the second largest armed forces in NATO, have been training Sunni Muslim and Kurdish Peshmerga units at the Bashiqa camp in northern Iraq and want them to take part in the 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 at 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. It said any foreign forces in Iraq should be there with the approval of the Baghdad government and under the umbrella of the U.S.-led coalition fighting Islamic State.
Turkey is part of the U.S.-led coalition against Islamic State and has played a frontline role in Syria. It says its troops are in Iraq as part of an international mission to train and equip Iraqi forces to fight Islamic State.
"Turkey does not move on orders from others ... Turkey’s presence in the Bashiqa camp will remain until Mosul is rid of Daesh," Turkish Deputy Prime Minister Numan Kurtulmus told the state-run Anadolu Agency on Wednesday, using an 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.
Turkey's parliament voted two weeks ago to extend the deployment of an estimated 2,000 troops across northern Iraq by a year to combat "terrorist organizations" - a wording broad enough to refer to Kurdish militants as well as Islamic State.
Iraq condemned the vote, and Prime Minister Haider al-Abadi warned Turkey risked triggering a regional war. His government has requested an emergency U.N. Security Council meeting to discuss the issue, and both countries have summoned each other's ambassadors in a mounting diplomatic stand-off.
Erdogan warned Abadi in a speech on Tuesday that he should "know his place", saying: "You are not my interlocutor anyway. You are not on my level, you are not of my quality. You ranting and raving from Iraq is not of any importance to us."
Abadi responded tersely on Twitter.
"Yes, we sure are not your equal, because we liberate our land with men not via Skype," he wrote, in apparent reference to an attempted coup in Turkey in July in which Erdogan addressed the nation via a video chat service on a cellphone.
On Wednesday, Erdogan lashed out at those criticizing Turkey's position on the Mosul operation, saying Ankara was being "indecently attacked" because it was daring to disrupt the regional balance of power.
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 furious at Washington's support for what it sees as a hostile force.
Erdogan slammed comments by U.S. Democratic presidential candidate Hillary Clinton in a debate on Sunday that she would consider arming Kurdish fighters in Syria, describing her words as "unfortunate and amateurish". He accused Washington of "working with one terrorist organization to destroy another".
The Turkish military, shaken by July's failed coup and already busy with its Syria offensive and a Kurdish militant insurgency at home near the Iraqi border, could be stretched by conflict on a third front.
Security sources said soldiers and military equipment, including armored vehicles, had been deployed near the Iraqi border with Iraq in recent days. The head of the armed forces, General Hulusi Akar, and force commanders visited army units in the border province of Sirnak on Wednesday.
Kurtulmus said Turkey would participate in the Mosul operation if the Kurdish YPG was not also 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.
Editing by Alison Williams