ANKARA, Turkey — In a move to ease tensions with its southeastern neighbor, Turkey has announced that it would continue to withdraw its troops in Iraq in a move to ease tensions with its neighbor.

The move announcement came after the Iraqi government appealed to the United Nations Security Council, claiming that Turkish troops stationed in Bashiqa in Iraq constituted an illegal deployment.

The troops had been were sent there in 2014 to train Iraqi paramilitaries in their fight against the Islamic State of Iraq and the Levant (ISIL or ISIS). But the Shiite-dominated Iraqi government recently asked Turkey to withdraw them those troops after regional tensions between pro-Sunni Turkey and Shiite Iran worsened.

The Turkish move to pull troops came after President Barack Obama spoke to Turkish President Recep Tayyip Erdogan on the phone and urged him to ease tensions with Iraq and withdraw the Turkish troops. Obama also urged Erdogan "to respect the sovereignty and territorial integrity of Iraq."

"Taking into account the sensitivities on the Iraqi side ... Turkey will continue the process it has already begun to withdraw its troops stationed in Mosul province," the Turkish foreign ministry said in a statement late on Dec. 19.

Up to 300 Turkish troops and 20 tanks were deployed in Bashiqa to protect Turkish military trainers.

The foreign ministry statement also said there had been a "lack of communication" with Baghdad on the matter and that Ankara "would continue to coordinate with the Iraqi government over its military contribution to the country in the fight against Daesh (ISIL)."