BAGHDAD/ANKARA Iraq's foreign minister said on Wednesday the government could resort to military action if it is forced to defend itself from what it calls an intrusion of Turkish forces into part of its northern territory.
Turkey said it had deployed a force protection unit earlier this month to the area, citing heightened security risks near a camp where its troops were training an Iraqi militia to fight Islamic State insurgents. Ankara acknowledged that there had been a "miscommunication" with Baghdad over the deployment.
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.
Foreign Minister Ibrahim al-Jaafari said Iraq was committed to exhausting peaceful diplomatic avenues to avoid a crisis with Turkey, its northern neighbour, but insisted that all options remained open.
"If we are forced to fight and defend our sovereignty and riches, we will be forced to fight," he told reporters in Baghdad.
Turkish Prime Minister Ahmet Davutoglu called his Iraqi counterpart Haider al-Abadi on Wednesday to emphasise that their two countries would "continue to work together and in full coordination" against Islamic State, Davutoglu's office said in a statement.
Davutoglu also congratulated Abadi after Iraqi forces retook the centre of the city of Ramadi this week, a victory that could help vindicate the Iraqi leader's strategy for rebuilding the military after stunning defeats.
Turkey's deployment of around 150 troops this month to the Bashiqa military base in northern Iraq prompted Baghdad to accuse Ankara of violating its sovereignty and lodge a formal complaint at the U.N. Security Council.
Turkey 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. It did not say how many troops would be moved or where to.
U.S. Vice President Joe Biden, in a phone call with Davutoglu earlier this month, welcomed the withdrawal and urged Turkey to continue trying to cooperate with Baghdad.
Biden will visit Turkey on Jan. 23 and will meet President Tayyip Erdogan and Davutoglu, sources from the Turkish prime minister's office said on Wednesday.
After the diplomatic dispute flared, the Bashiqa base came under fire from Islamic State when militants fired rockets in an attack on Kurdish Peshmerga forces in the area. The Turkish military said its soldiers returned fire and four had been lightly wounded in the incident.
Baghdad's forces have regrouped and retrained with U.S. help since the debacle at the hands of Islamic State 18 months ago and on Sunday retook the western provincial capital of Ramadi, their first big victory against the ultra-hardline militants.
(Writing by Stephen Kalin; editing by Mark Heinrich and Philippa Fletcher)