حَدَّثَنَا هَارُونُ بْنُ مَعْرُوفٍ، وَهَارُونُ بْنُ سَعِيدٍ الأَيْلِيُّ، وَالْوَلِيدُ بْنُ شُجَاعٍ السَّكُونِيُّ، قَالَ الْوَلِيدُ حَدَّثَنِي وَقَالَ الآخَرَانِ، حَدَّثَنَا ابْنُ وَهْبٍ، أَخْبَرَنِي أَبُو صَخْرٍ، عَنْ شَرِيكِ بْنِ عَبْدِ، اللَّهِ بْنِ أَبِي نَمِرٍ عَنْ كُرَيْبٍ، مَوْلَى ابْنِ عَبَّاسٍ عَنْ عَبْدِ اللَّهِ بْنِ عَبَّاسٍ، أَنَّهُ مَاتَ ابْنٌ لَهُ بِقُدَيْدٍ أَوْ بِعُسْفَانَ فَقَالَ يَا كُرَيْبُ انْظُرْ مَا اجْتَمَعَ لَهُ مِنَ النَّاسِ ‏.‏ قَالَ فَخَرَجْتُ فَإِذَا نَاسٌ قَدِ اجْتَمَعُوا لَهُ فَأَخْبَرْتُهُ فَقَالَ تَقُولُ هُمْ أَرْبَعُونَ قَالَ نَعَمْ ‏.‏ قَالَ أَخْرِجُوهُ فَإِنِّي سَمِعْتُ رَسُولَ اللَّهِ صلى الله عليه وسلم يَقُولُ ‏"‏ مَا مِنْ رَجُلٍ مُسْلِمٍ يَمُوتُ فَيَقُومُ عَلَى جَنَازَتِهِ أَرْبَعُونَ رَجُلاً لاَ يُشْرِكُونَ بِاللَّهِ شَيْئًا إِلاَّ شَفَّعَهُمُ اللَّهُ فِيهِ ‏"‏ ‏.‏ وَفِي رِوَايَةِ ابْنِ مَعْرُوفٍ عَنْ شَرِيكِ بْنِ أَبِي نَمِرٍ عَنْ كُرَيْبٍ عَنِ ابْنِ عَبَّاسٍ ‏.‏
Translation
'Abdullah b. 'Abbas reported that his son died in Qudaid or 'Usfan. He said to Kuraib to see as to how many people had gathered there for his (funeral). He (Kuraib) said

So I went out and I informed him about the people who had gathered there. He (Ibn 'Abbas) said: Do you think they are forty? He (Kuraib) said: Yes. Ibn 'Abbas then said to them: Bring him (the dead body) out for I have heard Allah's Messenger (ﷺ) as saying: If any Muslim dies and forty men who associate nothing with Allah stand over his prayer (they offer prayer over him), Allah will accept them as intercessors for him.

Comment

The Book of Prayer - Funerals

Sahih Muslim 948

Hadith Text

So I went out and I informed him about the people who had gathered there. He (Ibn 'Abbas) said: Do you think they are forty? He (Kuraib) said: Yes. Ibn 'Abbas then said to them: Bring him (the dead body) out for I have heard Allah's Messenger (ﷺ) as saying: If any Muslim dies and forty men who associate nothing with Allah stand over his prayer (they offer prayer over him), Allah will accept them as intercessors for him.

Scholarly Commentary

This hadith establishes the immense virtue of having forty believers offer the funeral prayer for a deceased Muslim. The condition "who associate nothing with Allah" refers to those free from shirk (polytheism) and possessing sound Islamic belief.

The intercession mentioned is of great significance - it demonstrates Allah's mercy in accepting the collective supplication of forty righteous believers to benefit the deceased. This emphasizes the importance of community participation in funeral prayers.

Ibn 'Abbas's careful counting to ensure the presence of forty people shows the companions' precision in implementing prophetic traditions. This hadith encourages Muslims to gather in substantial numbers for funeral prayers to seek divine mercy for the deceased.

Legal Rulings

The funeral prayer remains valid with fewer than forty participants, but this number carries special merit. Scholars differ on whether the forty must be residents of the same locality or if travelers may be included.

The condition of being free from shirk is essential for this specific reward. The prayer should be performed with proper conditions and pillars for the intercession to be granted by Allah's grace.