ANKARA (Reuters) - Turkey and Iraq, both concerned by the rise of al Qaeda in Syria, said on Friday their strained relations were improving and they would cooperate more closely to limit the spillover from Syria's civil war.
The two countries' dealings have been tense in recent years, not least because of Turkey's strengthening ties with northern Iraq's autonomous Kurdistan region, locked in a dispute with the federal government over oil and land rights.
After talks with his Turkish counterpart and Prime Minister Tayyip Erdogan, Iraqi Foreign Minister Hoshyar Zebari said while Baghdad and Turkey still had differences over Syria, both agreed on the need to contain the rising threat of extremism.
"What everybody is worried about is the increase in extremism ... and in the collapse, lets say erosion, of the state of Syria, because that would create chaos in the entire region," Zebari told Reuters in an interview.
The war in Syria, which borders both Turkey and Iraq, has drawn Sunni Islamists from across the region and beyond into battle against President Bashar al-Assad's government and has nourished the revival of al Qaeda in Iraq.
Al Qaeda's Syrian and Iraqi wings merged this year to form the Islamic State of Iraq and the Levant (ISIL), which has mounted attacks in Syria and Iraq and has taken territory in northern Syria close to the border with Turkey in recent weeks.
"A group like ISIL has made Iraq and Syria one front, and the movement of weapons and the movement of these elements has been a serious challenge to us daily," Zebari said.
Turkish Foreign Minister Ahmet Davutoglu said Syria had dominated his discussions with Zebari and the two had agreed on deeper co-operation, including a formal mechanism for more intensive talks between their governments.
"Unfortunately over past periods ... there was a stagnation in our mutual relations. Recently we have achieved a new momentum and there is a really strong will on both sides to take this further," he told a joint news conference.
Davutoglu will visit Baghdad in the first half of November, his first visit to the Iraqi capital since March 2011. Asked if Iraqi Prime Minister Nuri al-Maliki planned to visit Turkey, Zebari said he hoped relations would continue on a more senior level but he gave no date for any visit.
Iraq has been particularly angered by Turkey's involvement in the autonomous Kurdistan region's oil and gas industry. Zebari said energy issues had not been discussed on Friday but would be on the agenda at subsequent meetings.
Another source of tension has been the presence in Turkey of fugitive Iraqi Vice President Tareq al-Hashemi, sentenced to death in Baghdad on charges of running death squads.
Hashemi, a Sunni who fled to Turkey last year, has denied the charges and accused Maliki, a Shi'ite Muslim, of mounting a political witch-hunt against Sunni opponents.
Relations have been further strained in the past by Turkish air strikes in northern Iraq on bases of the Kurdistan Workers Party (PKK), a Kurdish militant group which has waged a three-decade insurgency against the Turkish state.
Turkey is now engaged in a peace process meant to end the conflict, but its parliament this month renewed for a sixth time a mandate allowing the army to strike PKK bases in a remote mountainous area of northern Iraq.
Zebari said Iraq fully supported the peace process but said the number of PKK fighters who had retreated to northern Iraq from Turkey, in line with Ankara's demands, was in the hundreds rather than thousands as some reports had suggested.
"We in Iraq have a vested interest in border security, of seeing the Kurdish issue settled within the Turkish democratic system and the unity of the Turkish state," he said.
Writing by Nick Tattersall; editing by Tom Pfeiffer