Ankara (AFP) - Turkey on Saturday said it would "continue" to pull its troops out of northern Iraq after US President Barack Obama urged President Recep Tayyip Erdogan to do so in order to de-escalate tensions with Baghdad over the deployment.

"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 foreign ministry said in a statement.

The Iraqi government earlier this week demanded the "complete withdrawal" of Turkish troops from its territory after Turkey deployed soldiers and tanks to a military camp near the city of Mosul.

Baghdad labelled the deployment an illegal "incursion" but Turkey said it was to protect Turkish trainers working with Iraqi forces battling the Islamic State (IS) jihadist group.

In a phone call on Friday, Obama asked Erdogan to take steps "to de-escalate tensions with Iraq, including by continuing to withdraw Turkish military forces".

He also urged Turkey "to respect the sovereignty and territorial integrity of Iraq".

A senior Turkish official said last week that between 150 and 300 soldiers and 20 tanks were deployed to protect Turkish military trainers at the Bashiqa camp near Mosul.

Turkey began partially withdrawing troops from the area on Monday.

In its statement late Saturday, the foreign ministry 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 (IS)".