I asked, "Messenger of Allah, what about the children of the believers?"He replied, "They are with their fathers."I said, "Messenger of Allah, even without any deeds?"He answered, "Allah knows best what they would have done."I asked, "Messenger of Allah, and the children of the polytheists?"He said, "They are with their fathers."I said, "Without any deeds?"He replied, "Allah knows best what they would have done."
حدثنا عبد الوهاب بن نجدة حدثنا بقية ح و حدثنا موسى بن مروان الرقي وكثير بن عبيد المذحجي قالا حدثنا محمد بن حرب المعنى عن محمد بن زياد عن عبد الله بن أبي قيس
قلت يا رسول الله ذراري المؤمنين فقال هم من آبائهم فقلت يا رسول الله بلا عمل قال الله أعلم بما كانوا عاملين قلت يا رسول الله فذراري المشركين قال من آبائهم قلت بلا عمل قال الله أعلم بما كانوا عاملين
[Its isnad is sahih] Bayhaqi narrated it in al-Qadar wal-Qadha, (Q) 103b, from the hadith of Abu Dawud, through him.Baqiyyah stated the chain of hearing explicitly and consecutively as found with Ajurri in al-Sharia, p. 195, and Muhammad bin Harb followed him in narrating it. There is also another route for it with Ahmad, 4/86.