BRUSSELS (Reuters) - Belgium will appeal against a judge’s order forcing it to repatriate two Belgian women convicted of being Islamic State militants and their six children from Syria, the migration minister said on Sunday.

A judge said on Wednesday that Belgium had to bring back Tatiana Wielandt, 26, Bouchra Abouallal, 25, and the children they had with militants, from the Al-Hol camp where they were being held in a Kurdish-dominated part of Syria.

Maggie De Block, the minister in charge of migration policy, told broadcaster VTM that a distinction had to be made between the mothers and the children.

“The children have not chosen to be born in such circumstances ... Four of the six are Belgian children, they have grandparents here, one child is reportedly very ill. We are responsible for seeing what we can do,” she told VTM.

She did not specify what the country might do about the other two children.

“The mothers, that’s a different story. They have been convicted here. They have contributed to the planning of terrorist attacks here. I think we have to assess the risks and not just willingly accept them.”

Both women were convicted in absentia of being members of Islamic State, and each sentenced to five years in jail by an Antwerp court in March.

Hundreds of European citizens, many of them babies, are being held by U.S.-backed Kurdish militias in three camps since Islamic State was ousted from almost all its territory last year, according to Kurdish sources.

European nations have been wrestling with how to handle suspected militants and their families seeking to return from combat zones in Iraq and Syria.

France is working to bring back children held by Syrian Kurdish forces, but will leave their mothers to be prosecuted by local authorities, French officials have said.

Paris is concerned that if these minors are left in Syria, they could eventually also become militants.

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

The judge said on Wednesday that Belgium must organize the travel within 40 days after being notified of the decision or pay a daily penalty of 5,000 euros ($5,718) for each child, up to a maximum 1 million euros.

($1 = 0.8744 euros)