Some Turkish troops stationed near the Iraqi city of Mosul have been withdrawn, officials say, after their deployment caused a diplomatic spat between Baghdad and Ankara.  

The troops were carried in a convoy of 10-12 military vehicles, Turkey's state-run Anadolu news agency said, quoting military sources.

"Some of the Turkish troops stationed in Basheeqa have transited to the north as part of a new arrangement," it said.

The report did not specify the number of troops, and whether they were moving deeper into northern Iraqi territory controlled by the Kurdistan Regional Government (KRG) or heading back to Turkey.

Turkish Prime Minister Ahmet Davutoglu said he has taken necessary steps for "new arrangement" of troops, saying presence will continue for military training

The office of KRG President Masoud Barzani told Al Jazeera that the move came after extensive dialogue between the governments of Iraq and Turkey and also after the UN Security Council urged both sides to resolve the matter peacefully.


READ MORE: The delicate question of Iraq's sovereignty


Turkey has had troops near Mosul, held by the Islamic State of Iraq and the Levant (ISIL) group in northern Iraq, since last year to help train local Kurdish and Sunni Arab forces, but the arrival of additional troops earlier this month sparked uproar in Baghdad.

Baghdad said the deployment had been carried out without consultation and violated national sovereignty and international law.

Turkey subsequently halted new deployments but has refused to withdraw its soldiers.

Ankara last week sent two of the most powerful men in Turkish foreign policy - foreign ministry under-secretary Feridun Sinirlioglu and intelligence chief Hakan Fidan - to Baghdad in an effort to settle the tensions.

Davutoglu said subsequently an agreement had been reached on a "reorganisation" of the Turkish troops. But it was never made clear what form this would take.

Source: Al Jazeera and agencies