Iraq, which has detained at least 560 women, as well as 600 children, identified as jihadist or relatives of suspected IS fighters, is wasting no time in putting them on trial.

The 27-year-old is one among the thousands of foreigners suspected of having fought for or supported jihadist groups, more or less directly, over the past years.

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 group's main suppliers of foreign fighters.

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.

Iraq and Syria's Kurds have netted foreign jihadists by the thousands but while the former is expediting trials, the latter would rather send them home.

In January, a court sentenced a German woman to death on charges of providing logistical support to IS 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.

Legal vacuum

There appears to be little ambivalence in Iraq over the fate of the foreign fighters and their families.

Retreat of the Islamic State group (photo by: Simon MALFATTO/AFP)

"These people have killed, put women into slavery... They have committed war crimes on Iraqi soil, and Iraqi la

w 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 AFP 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 IS 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.

Key card

"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.

s flag at Al-Naim square in Raqa on October 17, 2017 after the US-backed force took control of the city from the Islamic State group (photo by: BULENT KILIC/AFP)

"We wish to deliver these prisoners to their countries," he told AFP.

But after being held up as the heroes of the war against IS, 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 jihadists.

"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 an

d lawyers of some of the detained foreign jihadists 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.