Volunteers to fight the Islamic State, from different Iraqi factions including Kurdish and Yazidis, train at a camping area near Kurdish security points on Bashiqa mountain, around 15km Northeast of the Islamic State held city of Mosul, March 7, 2015. REUTERS/Asmaa Waguih

ANKARA (Reuters) - Some Turkish troops started leaving their camp in Iraq and moving north on Monday, a Turkish military source and a senior official said, days after Baghdad protested to the United Nations and ordered them out.

Any move northwards would take them back closer to Iraq’s border with Turkey, but the officials did not say where they were going and it was unclear how far Ankara was bowing to pressure to bring its soldiers home.

Iraq said in early December hundreds of Turkish troops had arrived in its territory without its knowledge, calling it a hostile act.

Turkey said at the time the troops were meant to guard an international mission training and equipping Iraqi forces who are preparing for an offensive to retake the Iraqi city of Mosul, seized by Islamic State militants more than a year ago.

But the move was widely seen as a Turkish attempt to establish a greater foothold in the simmering conflicts across its border, which have already pulled in other regional and global powers.

The office of Turkey’s Prime Minister Ahmet Davutoglu said on Friday it would reorganize its military personnel at the Bashiqa camp near Mosul after talks with Iraqi officials to settle the dispute. Last week President Tayyip Erdogan said it was out of the question that the troops would withdraw entirely from Iraq.

“Within the scope of the new arrangement, a convoy of 10-12 vehicles carrying some of our troops in Bashiqa have moved towards northern Iraq,” a senior Turkish official said.

On Friday, Iraqi Prime Minister Haider al-Abadi instructed his foreign ministry to lodge a formal complaint at the U.N. Security Council over the presence of the Turkish forces, asking it to order Turkey to withdraw its troops from Iraq immediately.