(47) باب مَتَى يَقْعُدُ إِذَا قَامَ لِلْجَنَازَةِ
Narrated 'Amir bin Rabi`a:
The Prophet (ﷺ) said, "If any one of you see a funeral procession and he is not going along with it, then he should stand and remain standing till he gets behind it, or it leaves him behind, or the coffin is put down before it goes ahead of him . "
Reference: Sahih al-Bukhari 1308
In-book reference: Book 23, Hadith 67
USC-MSA web (English) reference(deprecated numbering scheme): Vol. 2, Book 23, Hadith 395