Turkey says it will not allow terror groups like Daesh and the PKK to establish themselves along its border with Iraq.
US Defence Secretary Ashton Carter said on Friday that there is an agreement in principle to include Turkey in the operation to retake Iraqi city of Mosul from the Daesh terrorist organisation.
"Iraq understands that Turkey as a member of the counter-ISIL coalition will play a role in counter-ISIL operations in Iraq and secondly that Turkey – since it neighbours the region of Mosul – has an interest [in] the ultimate outcome in Mosul," Carter said, using an alternative acronym to refer to Daesh.
"I am confident that we can work things out and there are things that would be productive for Turkey to do and we just need to work through these practicalities."
Carter, during his one-day visit to Turkey, met with President Recep Tayyip Erdogan and other top Turkish officials on Friday.
Baghdad has demanded the withdrawal of all Turkish troops from a camp in Bashiqa near Mosul. Turkey has trained several thousand Iraqi Arab and Kurdish soldiers at the camp.
Ankara wants these forces to take part in the fight against Daesh and play a role as a holding force in the predominantly Sunni city, citing concerns about possible sectarian violence after the defeat of the group.
Carter also said he saw a military and political role for Turkey in an eventual assault on the Syrian city of Raqqah, which Daesh has established as its de facto capital.
"Likewise, Turkey will have a role ultimately in the collapse of Raqqah and then as a party in the region will have an interest in making sure that the governance of Raqqah is one that is reflective of the population there."
"We want to get ISIL out of Raqqah, we want to do that as soon as possible and we want the victory to last," he added.