France has been told to reconsider its decision not to repatriate two women who allegedly fled to join the so-called Islamic State (IS) group.
The European Court of Human Rights (ECHR) said that French authorities must consider each case on an "individual" basis.
The two French women left France in 2014 and 2015 to go to Syria and Iraq, where they gave birth to three children.
They say they have been trapped in the Kurdish-controlled refugee camps of Al-Hol and Roj in northeastern Syria since 2019 and have been exposed to "inhuman and degrading treatment".
France does not allow citizens to be repatriated from suspected IS camps in Syria on security grounds.
But the ECHR said that the French government must reconsider their repatriation "as soon as possible, subject to appropriate safeguards against arbitrariness" because they were French nationals.
France was also ordered to pay costs and expenses of €18,000 and €13,200 to each of the women's families, who brought the complaint.
The French foreign ministry said it had noted the ECHR decision and that it was ready to renew repatriation operations "whenever conditions allow".
Wednesday's verdict could have implications for a number of European countries that refuse to repatriate IS suspects.
While Germany and Belgium have repatriated nearly all their citizens from northern Syria, France only allowed 35 children and 16 women to return in July.
Around 100 French women and nearly 250 children are estimated to be in camps in Syria.
Lawyers and NGOs have criticised France's "cynical" decision to only repatriate certain children on a case-by-case basis since 2019.
This ECHR decision must lead to "a realisation to quickly repatriate all French children and their mothers held there," said Bénédicte Jeannerod from Human Rights Watch.