President Recep Tayyip Erdogan on Thursday urged the Iraqi government to eradicate the presence of the outlawed Kurdistan Workers' Party (PKK) to keep it from launching attacks inside Turkey.
Erdogan said following talks with visiting Iraqi Prime Minister Mustafa al-Kadhimi that the two countries viewed the PKK as one of their "common enemies".
The PKK, listed as a terror group by Turkey and much of the international community, has for decades used Iraq's mountainous areas as a springboard for its insurgency against the Turkish state.
The Turkish army regularly conducts cross-border operations and air raids on PKK bases in northern Iraq, which has put the two neighbours' relations under strain.
Turkey says it uses its right to self-defence.
"We agreed to continue our fight against our common enemies -- Daesh, PKK and FETO terror organisations," Erdogan told a joint televised news conference with al-Kadhimi, who became prime minister in May.
He was referring to the Islamic State (IS) group, the Kurdish militants and a movement led by the US-based Muslim preacher Fethullah Gulen, known in Turkey as FETO and blamed by Ankara for the 2016 failed coup attempt against Erdogan.
"Our region will not reach peace unless the head of terror is crushed," Erdogan said. "There is no place for terror in the future of Iraq, Turkey and Syria."
Al-Kadhimi said his country would not allow any terror group to use Iraqi soil for attacks inside Turkey, and that it was cooperating with Ankara to confront terror groups.
"Iraq has a clear stance in condemning any action threatening Turkey or using the Iraqi territory to threaten Turkey's national security," al-Kadhimi said.
The PKK's insurgency against the Turkish state is believed to have killed tens of thousands of people since being launched in 1984.
The group's fighters have sheltered in Iraq's mountains, where manned warplanes and ground troops have struggled to reach them.
Ankara has increasingly reverted to the use of drone warfare to attack the PKK bases.