Haj continued, “There are several legal remedies to address the situation of these children. Registers and official documents may be issued to them. This is the main procedure aimed to ensure their integration into society according to … the constitution."

The Iraqi Constitution defines Iraqi nationality. Haj said three provisions apply to children with unknown parentage, relating to their Sharia, legal and social status. He noted, “The Sharia prohibited insulting and hurting children with unknown parentage, allowed their adoption and gave them the right to inherit.”

Kazem al-Haj , a political and social researcher at al-Hadaf Network for Political and Media Analysis, argued that it's critical to address the situation of children with unknown parentage to avoid the social problems caused by a generation brought up in extreme conditions. He told Al-Monitor, “Children with unknown parentage are distributed in large percentages in the areas that were under the control of the Islamic State."

Under Iraqi law , for these children to become registered and granted Iraqi nationality there must be an official marriage certificate to prove they were born under a legal union. This has led the Iraqi Foreign Ministry to call on the international community to adopt children who are known to be non-Iraqi. But what about those offspring whose lineage remains unknown, including those who lost their parents in the war?

When the Islamic State (IS) was finally driven from Iraq in July 2017, it left material ruin in its wake. It also left behind a legacy of abandoned children and orphans, many afflicted with psychological and social scars and many with no registration papers or trace of their parentage.

Retired Iraqi Judge Tariq Harb told Al-Monitor the marriages of foreign fighters were performed under procedures put in place by IS. Therefore, "It is necessary to find a legal remedy for their [children's] situation.”

Al-Monitor also spoke with Judge Noaman Thabit Hassan, the head of public prosecution in Ninevah. He said, “Since the liberation of Ninevah [from IS], public prosecution authorities have turned care centers into orphanages for children with unknown parentage. These centers are hosting around 70 children.”

But terrorist groups like IS have left more than 800 young children and minors of different nationalities in Iraq, Joint Operations spokesman Brig. Gen. Yahya Rasool told Al-Monitor.

IS encouraged members to marry and have children, to foster a new generation that would embrace its ideology and grow up to fight in its ranks. But even within the group, there were children of unknown parentage or whose parents were killed in battle. So in 2016, IS established centers called "sons of the caliphate homes" to accommodate these children, both boys and girls.

Another measure is employed when the father's nationality can be established. Ministry of Foreign Affairs spokesman Ahmad Mahjoub told Al-Monitor, “Once the ministry is sure of the children’s identity and origin based on official documents and judicial rulings, it works on repatriating them to their country of origin after communicating with their embassies in Baghdad — provided that they aren't involved in a crime or terrorist act, or that they have served their sentence.”

Commenting on another measure, legal expert and former Judge Ali Tamimi told Al-Monitor, "Should their country of origin refuse to receive them, they would be placed in the state’s centers for orphans after being tried [if necessary]. It should be noted that under Iraqi law, children are excluded from liability for their parents’ crimes.”

He added, “Iraqi families could be encouraged to [foster] children of unknown parentage, which is possible under Iraqi law.”

But children of uncertain parentage aren't easily accepted in Iraq, and their lineage isn't the only issue for these children. They were born and raised in an extremist environment. Many attended classes to instill in them the ideas and ideologies of terrorist organizations and were trained to use arms. This makes their repatriation an urgent matter, so they can be rehabilitated and become accustomed to a normal life.

Human rights activist Mona Shemri, a founding member of Al-Warth Charitable Society for Social Solidarity, said, “Children of IS and foreign fighters are being taken good care of in orphanages and nurseries in Iraq. [Also], all services are made available for the juveniles who are placed in detention centers at the Justice Ministry, in coordination with the Interior Ministry. A good number of [children have been fostered] by Iraqi families who were not notified that they might be the offspring of IS militants to prevent them from being rejected.” She added, "Last month, three children were sent to live temporarily with families in France.”