Turkish President Recep Tayyip Erdogan has said the recent Daesh attack on Turkish troops stationed in Iraq's Bashiqa camp justifies Turkey's decision to not withdraw completely from the region.

Turkish troops repulsed an attack on Bashiqa Camp near Mosul late Thursday and killed at least 18 Daesh militants.  

"I have been told that some 18 Daesh terrorists who tried to sneak into the Bashiqa camp were neutralized," Erdogan told reporters in Istanbul Friday, confirming that there were no casualties among the Turkish troops.

"Of course this [attack] only proves just how appropriate was the step taken regarding the camp," he said, referring to Turkey's decision to send reinforcement units to the camp in early December.

Turkey has been running a training program at the camp to provide training to Iraqi volunteers as part of its fight against Daesh. 

Meanwhile, Turkish Prime Minister Ahmet Davutoglu told the media in Istanbul that Turkish presence in Bashiqa was "only against Daesh" and a "natural consequence" of Turkey's efforts to fight against terrorism along with the international coalition and the Iraqi government. 

Davutoglu added that Turkey had no other "agenda or secret goal" in Iraq. 

"When the central Iraqi government gains control of the whole region so as to protect its sovereignty, then there will not be a need for Turkish presence," he said, reiterating Turkey's commitment to Iraq's territorial integrity and sovereignty.

He also said that northern Iraq was an issue of national security for Turkey since the "presence of PKK and Daesh threatens Turkey more than any other country".

On Dec. 4, Turkey reinforced the protection component of its units at the camp due to increasing security threats.

Following a series of bilateral talks to alleviate Iraq’s concerns, Turkey rearranged the number of its troops in Bashiqa on Dec. 14, with the additional troops having been pulled back to rear positions.

Turkey said at the time that 150 soldiers and up to 25 tanks were stationed in Bashiqa to protect Turkish servicemen training Iraqi volunteers to fight Daesh. The training mission had been in Iraq since March and was not assigned to combat duties.

Anadolu Agency