Turkish troops repelled an attack by Islamic State militants on a military base in northern Iraq where Turkish soldiers are training an Iraqi militia, Turkish military sources told Reuters on Friday.
The Turkish sources cited local sources as saying 17 Islamic State militants were killed in an attack on the Bashiqa camp in Nineveh province, about 140 Km (90 miles) from the Turkish border.
Turkey deployed a force protection unit of around 150 troops last month citing heightened security risks near Bashiqa, where its troops are training the Iraqi militia to fight Islamic State, and stirring a diplomatic row.
Iraq has objected to the deployment and Iraqi Prime Minister Haider al-Abadi accused Ankara last week of failing to respect an agreement to withdraw the troops. Iraq's foreign minister warned Baghdad could resort to military action if forced.
Iraqi security forces have had only a limited presence in Nineveh province, where the camp is located, since collapsing in June 2014 in the face of a lightning advance by Islamic State.
Ankara has acknowledged there was a "miscommunication" with Baghdad over the deployment.
It later withdrew some troops to another base inside the nearby autonomous Kurdistan region and said it would continue to pull out of Nineveh province, where Bashiqa is located; but President Tayyip Erdogan has ruled out a full withdrawal.