Hadith 10084

حَدَّثَنَا يَحْيَى ، عَنْ مُحَمَّدِ بْنِ عَمْرٍو ، قََالَ : حَدَّثَنَا أَبُو سَلَمَة ، َعَنِ أَبِي هُرَيْرَةَ , أَنّ النَّبِيَّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّم سُئِلَ عَنْ أَطْفَالِ الْمُشْرِكِينَ ، فَقَالَ : " اللَّهُ أَعْلَمُ بِمَا كَانُوا عَامِلِينَ " .
It is narrated from Hazrat Abu Huraira (may Allah be pleased with him) that once the ruling regarding the children of polytheists who die in infancy was asked from the Holy Prophet (peace and blessings be upon him), so the Holy Prophet (peace and blessings be upon him) said: Allah knows best what deeds they would have done when they grew up.
Hadith Reference مسند احمد / مسند المكثرين من الصحابة / 10084
Hadith Grading حکم دارالسلام: حديث صحيح، وهذا إسناد حسن، خ: 6599، م: 2659