"We ask all diplomatic missions in Iraq, resident and non-resident, to take back their nationals who have served their sentences and children who are not convicted," said foreign ministry spokesman Ahmed Mahjoub.
"Iraq has informed all of the countries that have citizens in its prisons. We have already spoken with the embassies of Germany, Azerbaijan, Russia and other countries to take (their citizens) back."
At least 833 children of 14 nationalities are currently in prison in Iraq, a military official told Agfence France Presse.
According to Iraqi authorities, a lot of foreigners who fought alongside ISIS in the country were from Russia, mainly Chechnya and former Soviet republics.