Ikrimah (may Allah have mercy on him) narrates from Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both) that the Messenger of Allah (peace and blessings be upon him) was on one of his military expeditions, and a man said: O Messenger of Allah! What do you say about the children (of the enemy) who are absorbed in play? The Messenger of Allah (peace and blessings be upon him) remained silent and gave him no answer, until the Messenger of Allah (peace and blessings be upon him) finished his expedition and moved on (with the army). Suddenly a child (was seen who) had fallen from a litter (a camel-saddle), and the caller called out: Where is the one who asked about the playing children? So the man came to the Messenger of Allah (peace and blessings be upon him), and he (peace and blessings be upon him) forbade killing their children and said: "Allah knows best what they would have done (had they grown up)."
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 11856