It is narrated from Sayyiduna Sa'b bin Jaththamah (may Allah be pleased with him) that he asked the Prophet (peace and blessings be upon him) about a raiding party that strikes children in the confusion of the attack (what is the ruling on this)? The Messenger of Allah (peace and blessings be upon him) said: "Their children are also of them."
Then he (peace and blessings be upon him) forbade the killing of children on the day of Khaybar.
Hadith Referenceالمعجم الكبير للطبراني / باب الصاد / 7419