Iraqi Prime Minister Haider al-Abadi walks with officers as he arrives in Mosul, Iraq, March 14, 2018. Iraqi Prime Minister Media Office/Handout via REUTERS ATTENTION EDITORS - THIS IMAGE WAS PROVIDED BY A THIRD PARTY. NO RESALES. NO ARCHIVES.

Abadi’s pledge, made during a phone call with Turkish Prime Minister Binali Yildirim, came a day after Ankara threatened to intervene directly if the Iraqi operation against the militants based in the Sinjar region failed.

Turkey has long complained that fighters of the outlawed Kurdistan Workers Party (PKK) are being given free rein to operate out of Sinjar against Turkish targets.

“Iraqi security forces have been instructed not to allow the presence of foreign fighters in the border region,” Abadi’s office quoted him as telling Yildirim in their conversation.

The chief of Iraq’s military General Staff, Lieutenant General Othman al-Ghanmi, echoed that message during an inspection tour on Tuesday of troops deployed in Sinjar, the state-run news website Iraqi Media Network reported.

“The Iraqi army is in full control of Sinjar and the border strip with Turkey,” it quoted him as saying.

On Monday Turkish President Tayyip Erdogan said Turkey’s intelligence chief would meet an Iraqi official to discuss the Iraqi military operation in Sinjar.

Erdogan said Turkey would do “what is necessary” if the Iraqi operation failed, raising the prospect of a possible direct Turkish military operation.

Turkish forces are currently waging a full-scale military operation in the Afrin region of northern Syria against the U.S.-allied YPG Kurdish militia that Ankara says has close ties to the PKK.

The PKK, which is classified as a terrorist organisation by the United States and the European Union as well as by Turkey, has waged an insurgency against the Turkish state for decades. It has been based in Iraq’s Qandil mountains near the border with Iran for decades.

Sources in northern Iraq said last Friday the PKK would withdraw from Sinjar, where it gained a foothold in 2014 after coming to the aid of the Yazidi minority community, who were under attack by Islamic State militants.