Hadi al-Amiri, center, head of the Badr Organisation, greets protesters during a demonstration against Turkish military deployment in Iraq, at Tahrir Square in central Baghdad, Iraq, December 12, 2015. (Ahmed Saad/Reuters)

Turkey has acknowledged a “miscommunication” with Iraq over its deployment of troops to the military base at Bashiqa in northern Iraq, Turkey’s foreign ministry said Saturday.

The ministry said that Turkey would continue to move some of its troops out of Nineveh province, where the camp is based. It did not say how many troops would be moved or to where.

Turkey deployed hundreds of troops in the Bashiqa area this month, with the stated aim of protecting its military personnel who were training Iraqi militias to fight against the Islamic State. Baghdad has criticized the deployment, and demanded that Turkey pull out the troops.

Turkey’s statement comes a day after President Obama urged Turkish President Recep Tayyip Erdogan in a phone call to “de-escalate tensions” with Iraq by continuing to withdraw Turkish forces.

Some troops were moved earlier this week to another base inside Iraq’s Kurdistan region, but Baghdad said that they should be completely withdrawn.

Hadi al-Amiri, center, head of the Badr Organisation, greets protesters during a demonstration against Turkish military deployment in Iraq, at Tahrir Square in central Baghdad, Iraq, December 12, 2015. (Ahmed Saad/Reuters)

Ankara has said that the deployment of the force-protection unit was due to heightened security risks near the camp, which is close to the Islamic State-held Iraqi city of Mosul. The base came under fire from the Islamic State on Wednesday, when militants fired rockets as they launched a wave of attacks against Kurdish forces. The Turkish armed forces said that soldiers returned fire, and four had been lightly wounded in the incident.