Abdullah bin Abbas reported,

The Messenger of Allah ﷺ was on one of his military expeditions when a man asked him, "Messenger of Allah, what do you say about the children?" He remained silent and gave him no reply.When the Messenger of Allah ﷺ had finished his expedition, or his campaign against the enemy, and had prevailed over them, he went about and came upon a small child who had fallen, scratching at the earth. So he ordered a caller to announce, "Where is the one who asked about the children?"The man came to the Messenger of Allah ﷺ, and the Messenger of Allah ﷺ forbade the killing of children, saying, "Allah knows best what they would have done."

Azami 1086

Hasan

عن ابن عباس، قال

كان رسول الله ﷺ في بعض مغازيه فسأله رجل، فقال يا رسول الله، ما تقول في اللاهين؟ فسكت فلم يرد عليه، فلما فرغ رسول الله ﷺ من غزوه- أو عدوه- وظهر عليهم طاف، فإذا هو بصبي قد سقط محقة، فإذا هو يبحث في الأرض، فأمر مناديا: أين السائل عن اللاهين؟ فجاء الرجل إلى رسول الله ﷺ، فنهى رسول الله ﷺ عن قتل الأولاد، فقال: الله أعلم بما كانوا عاملين.

الأعظمي 1086حسن
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Faith
Chapter
Belief in the divine decree and predestination
Section
Prophet ﷺ was asked about the offspring of the polytheists in the Hereafter and he said, "Allah knows best what they would have done"
Numbering
Jami al-Kamil 1086 (2nd edition)
Azami 1086