BRUSSELS (Reuters) - A Belgian judge has ordered the government to repatriate six children of Islamic State (IS) militants and their mothers who have been detained in a camp in Kurdish-controlled Syria, the national news agency Belga said on Wednesday.

FILE PHOTO: Kurdish-led militiamen ride atop military vehicles as they celebrate victory over Islamic State in Raqqa, Syria, October 17, 2017. REUTERS/Erik De Castro/File Photo

Tatiana Wielandt, 26, and Bouchra Abouallal, 25, both Belgian citizens, and their children have been held in the Al-Hol camp in since the defeat of IS in nearly all territory it once held in Syria and Iraq.

Belga quoted the court ruling as ordering the Brussels government to take all necessary and possible measures to ensure the six children and their mothers can return to Belgium.

It must do so within 40 days after being notified of the decision or pay a daily penalty of 5,000 euros for each child, up to a maximum 1 million euros, newspaper De Tijd said. The Belgian government can appeal the ruling.

No comment was available from the court on Wednesday due to a public holiday. A lawyer for the two women was not immediately available for comment.

A spokesman for the foreign ministry said it would “analyze the situation together” with the justice and interior ministries.

Hundreds of European citizens, many of them babies, are being kept by U.S.-backed Kurdish militias in three camps since IS was ousted last year from almost all the large swathes of territory it seized in 2014-15, according to Kurdish sources.

European nations have been reluctant to take them back, regarding children of jihadists both as victims and threats - difficult to reintegrate into schools and homes.

European diplomats say they cannot act in a region where Kurdish control is not internationally recognized. Moreover, there is little popular sympathy for militants’ families after a spate of deadly IS attacks across western Europe.

The Kurd say it is not their job to prosecute or hold them indefinitely, leaving the women and children in legal limbo.

However, mounting concern over the apparent abandonment of hundreds of children with a claim to EU citizenship - most of them under six - is pushing governments to quietly explore how to tackle the complexities of bringing them back.