QAMISHLI, Syria (AFP) - Iraq and Syria's Kurds have netted foreign militants by the thousands but while the former is expediting trials, the latter would rather send them home.
A Baghdad court on Monday sentenced Frenchwoman Melina Boughedir to seven months in prison, a term she had already served by the time she was tried.
The authorities only found her guilty of entering Iraq illegally and she will soon be able to return to France, a country which was one of the Islamic State in Iraq and Syria (ISIS) group's main suppliers of foreign fighters.
The 27-year-old is one among the thousands of foreigners suspected of having fought for or supported militant groups, more or less directly, over the past years.
Iraq, which has detained at least 560 women, as well as 600 children, identified as militant or relatives of suspected ISIS fighters, is wasting no time in putting them on trial.
In January, a court sentenced a German woman to death on charges of providing logistical support to ISIS and on Sunday a Turkish woman was also handed the death penalty.
France so far has ignored appeals by families and lawyers advocating repatriations and said it supported the idea of its nationals detained in Iraq and Syria being tried there.
Paris has said it would only intervene if death penalties were handed down. Iraq is one of the countries in the world that carries out the most executions.
Most countries, especially in Europe where a string of deadly attacks has had a major impact on public opinion, do not want to see those detained nationals return on their soil.
There appears to be little ambivalence in Iraq over the fate of the foreign fighters and their families.
"These people have killed, put women into slavery... They have committed war crimes on Iraqi soil, and Iraqi law prevails," said the main spokesman of Iraq's judiciary, Abdel Sattar Bayraqdar.
Across the border, the Syrian Kurds have more misgivings.
"We have arrested thousands of foreign jihadists and we still capture some every day," Redur Khalil, a senior spokesman, told Agence France-Presse in the Kurdish region of Syria.
Khalil is an official in the People's Protection Units, a group which formed the backbone of an outfit that was the US-led coalition's main ground partner in the fight against ISIS in Syria.
"We want foreign jihadists to be tried in their home countries," he said.
The Kurdish forces have more immediate priorities, such as fending off a Turkish military offensive on the enclave of Afrin.
The Kurdish administration in northeastern Syria is self-proclaimed, which leaves many legal question marks hanging over its dealing with foreign states over such an issue.
The semi-autonomous region is led by a de facto government and elections are due for its parliament but its fledgling institutions are not recognised internationally.
"According to which law can we sentence them?" Khalil asked, adding: "We don't have big prisons."
Abdul Karim Omar, a senior official in one of the three cantons of the autonomous Kurdish territory, said a bilateral deal had been reached with Indonesia and Russia, calling for others to follow suit.
"We wish to deliver these prisoners to their countries," he told AFP.
But after being held up as the heroes of the war against ISIS, Syria's Kurds face the risk of isolation on the international scene and appear ready to accommodate some of the states least willing to take back their militants.
"If it's not possible to deliver them, we will put them into court here," Omar said.
Sentences in Syrian Kurdish courts go up to 20 years in jail for terrorism-related charges but can be reduced.
The families of and lawyers of some of the detained foreign militants have voiced concern that these foreign detainees will turn into bargaining chips in geopolitical horse-trading.
"The Kurds are perfectly aware that these foreign detainees are a key card in their hand," said Martin Pradel, a lawyer for several French nationals held in Syria.