وَعَنْهُ قَالَ: سُئِلَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ عَنْ ذَرَّارِيِّ الْمُشْرِكِينَ قَالَ: «اللَّهُ أعلم بِمَا كَانُوا عاملين»
He also reported that when God’s messenger was questioned about the offspring of polytheists he said, “God knows best about what they were doing.” (Bukhari and Muslim.)
Related hadith on this topic