Turkey has said it will not withdraw hundreds of soldiers who arrived last week at a base in northern Iraq, despite being ordered by Baghdad to do so within 48 hours. The arrival of such a large and heavily armed Turkish contingent in a camp near the frontline has added yet another controversial deployment to a war against Islamic State fighters that has drawn in most of the world’s major powers. Ankara says the troops are there as part of an international mission to train and equip Iraqi forces to fight against Isis. The Iraqi government says it never invited such a force, and will take its case to the UN if they are not pulled out, The Guardian reported. Washington, which is leading an international coalition against Isis that includes Turkey, Arab states and European countries such as Britain and France, has told the Turkish and Iraqi governments to resolve the standoff, and says it does not support deployments in Iraq without Baghdad’s consent. The Turkish presence is an embarrassment for the Iraqi prime minister, Haider al-Abadi, who is under pressure from powerful Iran-backed Shia political groups to kick the troops out. Shia parties linked to militia groups armed and funded by Tehran have also complained about US plans to station special forces in Iraq to conduct raids and guide bombs against Isis. Political pressure on Abadi could make those plans more difficult to carry out. Political analysts saw last week’s deployment by Turkey, which has the second biggest army in Nato, as an attempt to assert its influence in the face of increased Russian and Iranian involvement in Syria and Iraq. “Turkey seems to be angling to prove to the Russians and Iranians that they will not be allowed to have either the Syrian or Iraqi war theatres only to themselves,” said Aydın Selcen, a former consul general of Turkey in Irbil, the capital of Iraq’s autonomous Kurdish region. The troops arrived on Thursday with tanks and armored personnel carriers at a camp in territory held by Iraqi Kurds near the Isis-held city of Mosul. Ankara said they were there to help protect a training mission close to the frontline. “It is our duty to provide security for our soldiers providing training there,” the Turkish foreign minister, Mevlüt Çavuşoğlu, said in an interview on Turkey’s Kanal 24 television. “Everybody is present in Iraq ... The goal of all of them is clear. Train-and-equip advisory support is being provided. Our presence there is not a secret.” Abadi has called the Turkish deployment a violation of Iraqi sovereignty. An Iraqi government spokesman, Saad al-Hadithi, said Baghdad was still waiting for Ankara to respond officially. “In case we have not received any positive signs before the deadline we set for the Turkish side, then we maintain our legal right to file a complaint to the [UN] security council to stop this serious violation to Iraqi sovereignty,” he said. A senior Turkish official said Baghdad’s objections had come as a surprise: “There was no single development ... that happened without informing the central government.” “The military personnel for training will stay. Not because we want them [there] particularly but because there is a demand from the Iraqi side. The discussion with the central government still continues,” the official told reporters. He said the total number of Turkish troops in Iraq was far fewer than 1,000 soldiers, with some having arrived from Turkey and others sent to the base from other parts of Iraq. Isis militants overran Mosul, Iraq’s main northern city and home to about 2 million people, in June 2014. An expected counter-offensive by Iraqi forces has been repeatedly postponed because they are involved in fighting elsewhere. The US-led coalition has been carrying out airstrikes on Isis bases in both Iraq and Syria for more than a year. Russia joined the regional conflict with airstrikes on Syria two months ago, and like Iran is allied to the Syrian president, Bashar al-Assad, who is opposed by Turkey, the US and their allies. Turkey shot down a Russian warplane last month, causing a breakdown in relations with Moscow.