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.
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.