Iraq and Turkey have signed a security agreement aimed at curbing the activities of the Turkish Kurdish separatist group, the PKK.
Turkish and Iraqi interior ministers ironed out most of their differences
However, the final agreement does not include a key Turkish proposal that its troops be allowed to pursue PKK fighters over the border into Iraq.
The proposal had been strongly opposed by the Kurdish officials in Iraq.
The Iraqi Kurds deny supporting the PKK but say they must be party to any agreements that affect them.
Turkey's Interior Minister said this was a deal to prevent terrorist activity and primarily the Kurdistan Workers' Party or PKK.
But it falls far short of what Ankara was pushing for, BBC's Sarah Rainsford reports from Istanbul.
The Co-operation Pact does not grant Turkish troops permission to cross the border in what is called hot pursuit of PKK fighters, she adds. The minister says talks on that issue will continue.
Turkey does not recognise the legitimacy of the administration in northern Iraq, but officials there are the most staunchly opposed to allowing Turkish troops onto their territory.
The agreement has been signed is broad ranging: a pledge to prevent finance, logistical support and propaganda for the PKK.
A co-ordination committee will meet every six months to review the agreement's implementation.
Ankara has warned Baghdad to crack down on Kurdish rebels in Iraq or face a possible incursion by Turkish troops.
PKK has fought a bloody war since the '80s
Tens of thousands of people in Turkey have died in the insurgency, including at least 80 Turkish troops this year.
The rebels from the PKK have been fighting for autonomy in south-eastern Turkey since the 1980s.
Turkey says about 4,000 PKK fighters are in Iraq's north.
In August, the two countries signed a memorandum of understanding on security, agreeing to "expend all efforts" to oust the fighters from Iraqi Kurdistan.
The PKK has been labelled a terrorist organisation by Turkey, the US and the EU.