Move comes after images of young children in tears, housed in metal cages, set off an international outcry.