وَحَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ، وَعَمْرٌو النَّاقِدُ، وَزُهَيْرُ بْنُ حَرْبٍ، وَابْنُ، نُمَيْرٍ قَالُوا حَدَّثَنَا سُفْيَانُ، عَنِ الزُّهْرِيِّ، عَنْ سَالِمٍ، عَنْ أَبِيهِ، عَنْ عَامِرِ بْنِ رَبِيعَةَ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏"‏ إِذَا رَأَيْتُمُ الْجَنَازَةَ فَقُومُوا لَهَا حَتَّى تُخَلِّفَكُمْ أَوْ تُوضَعَ ‏"‏ ‏.‏
Translation
It is narrated on the authority of 'Amir Ibn Rabi'a (may Allah be pleased with him) that the Prophet (ﷺ) said

Whenever you see a funeral procession, stand up for that until it moves away or is lowered on the ground.

Comment

The Book of Prayer - Funerals

Sahih Muslim 958 a

Hadith Text

"Whenever you see a funeral procession, stand up for that until it moves away or is lowered on the ground."

Commentary

This hadith establishes the obligation of standing for funeral processions as a mark of respect for the deceased. The scholars have differed regarding whether this standing is obligatory (wajib) or recommended (mustahabb). The majority position holds it to be a confirmed sunnah, based on the Prophet's consistent practice and explicit command.

The wisdom behind this ruling includes honoring the deceased, showing respect for the solemnity of death, and reminding oneself of one's own mortality. The standing should commence when the funeral bier becomes visible and continue until it has passed or been placed on the ground for burial.

Exceptions to this ruling include: those performing prayer (salah), those riding mounts who may remain seated, and those engaged in scholarly circles or teaching where interrupting the session would cause greater harm. The standing is for Muslim funerals specifically, though some scholars extend it to non-Muslim funerals as a general display of humanity.