The U.N. children's fund has issued a stark warning to Iraqi troops and Islamic State militants to spare the children amid a battle to retake the city of Fallujah city.

UNICEF said on Wednesday that it's concerned for the safety of an estimated of 20,000 children trapped inside this city west of Baghdad as very few families have managed to flee Fallujah since the offensive started more than a week ago.

It also warns they face the risk of forced recruitment by the militants and called on warring parties to "protect children inside Fallujah" and "provide safe passage to those wishing to leave the city."

Fallujah has been under IS control for over two years — the last major city in western Iraq still held by the Islamic State group.