Over 150 children of Turkish ISIS members detained in Iraq were handed to authorities in Ankara on Wednesday.
Iraqi judicial spokesman, Judge Abdul Sattar Birqdar, said that the 188 Turkish children were handed over in the presence of officials from both governments.
Some of those handed over to Turkish authorities had "come of age" while being held and had been convicted of illegally crossing the border and served out their sentences.
No further information was given on the background of the children.
Children can be held responsible for crimes in Iraq starting from the age of nine.
Iraqi law allows detainees to be held with their offspring until the age of three, but older children have to live with non-incarcerated relatives. This has posed a problem for authorities when dealing with the children of foreign ISIS members.
Officials in Baghdad said they want to help those who gave not committed any crimes return to their home countries.
Some of the children are foreign nationals whose parents took them to Iraq to be raised under ISIS rule, or child fighters recruited in to what the group once called the “cubs of the caliphate”.
Many have seen their parents die in the fighting or be detained by rival forces and their fate remains uncertain.
The insurgents seized large parts of Iraq in lightening 2014 offensive, leading to a three-year battle to dislodge the insurgents from urban centres. Victory was finally declared in December 2017.
It comes as an Iraqi court sentenced a seventh French national to death on Wednesday after finding him guilty of joining ISIS, a charge that Paris has refuted.
Thousands of Iraqi and foreign suspects are in Iraqi custody facing charges related to fighting with or supporting the terror group.
The convicted men have 30 days to appeal the charge.
They men are among 13 French nationals caught in Syria who were hand over to Iraq at the beginning of the year by the US-backed Syrian Democratic Forces.
One was released after Iraqi authorities found no evidence he had fought with a militant group and said he had entered Syria “legally” to help members of the Yazidi community who were kidnapped by ISIS.
France called on Iraq not to carry out the sentence. "We are increasing steps to avoid the death penalty for these four French citizens," Foreign Minister Jean-Yves Le Drian said on France Inter radio on Tuesday, before the fresh sentences were issued.
Mr Le Drian did not elaborate further, but said he spoke to Iraqi President Barham Salih about the case.
The prosecutions have prompted human rights groups to accuse Baghdad's central government and other regional forces of unfair convictions.
Human Rights Watch also criticised Iraq’s counterterrorism law as “deeply flawed and vague,” noting that some of the trials for ISIS suspects were as short as “five minutes”.