France's top diplomat held talks in Baghdad on Thursday about transferring foreign jihadists from northern Syria, where a Turkish offensive has triggered fears of mass jailbreaks, to be tried in Iraq.
European governments are worried that the Turkish operation will allow the escape of some of the 12,000 suspected Islamic State (IS) group fighters -- including thousands of foreigners -- held by Syrian Kurds.
The issue was top of the agenda for French Foreign Minister Jean-Yves Le Drian in his talks with his Iraqi counterpart Mohammed Ali al-Hakim, President Barham Saleh and Prime Minister Adel Abdel Mahdi.
Le Drian said he had discussed with Iraqi leaders "the way to implement an appropriate judicial mechanism" to try French and other fighters "in the best conditions".
The aim is for foreign jihadists to be tried in Iraqi courts while upholding certain principles of justice and respect for human rights, a French diplomatic source said.
One issue will be Iraq's use of the death penalty, which is outlawed throughout the EU.
Belgium, Britain, Denmark, France, Germany, the Netherlands and Sweden sent officials on a technical mission to Baghdad this week to assess the situation.
"There are talks between the Americans, the British, French and Iraqis about funding the construction of prisons," Hisham al-Hashemi, an Iraqi expert on IS, told AFP.
Le Drian urged the international coalition against IS to confront the "new risks created by the Turkish intervention in northeast Syria and the risk of an IS resurgence."
'Fuel chaos'
Hundreds of foreigners have been sentenced to death or life imprisonment in Iraq for belonging to IS.
Eleven French jihadists handed over to Iraqi authorities early this year by US-backed Kurdish forces in Syria were sentenced to death by a court in Baghdad.
In April, Iraq offered to try foreign IS suspects in exchange for operational costs.
One Iraqi official said Baghdad had requested $2 billion to put the suspects on trial.
Turkey on Monday accused Kurdish forces of deliberately releasing IS prisoners held at a prison in the Syrian border town of Tal Abyad "in an attempt to fuel chaos in the area".
Kurdish officials claimed that Turkish bombardments had allowed nearly 800 relatives of foreign IS fighters to escape from a camp for the displaced.
According to the Kurdish administration, there are around 12,000 suspected IS fighters in the custody of Kurdish security forces across northeastern Syria.
At least 2,500 of them are non-Iraqi foreigners of more than 50 different nationalities. Tunisia is thought to have the biggest contingent.
Officials in Paris say 60 to 70 French nationals are among those held.
The rest are around 4,000 Syrians and roughly the same number of Iraqis.
The fighters, who were detained mostly in the course of operations led by Kurdish forces and backed by the US-led coalition against IS, are detained in at least seven facilities.
Western governments such as France have been reluctant to take them back, for lack of a clear legal framework and fear of a public backlash.