The Prophet ﷺ said, "When one of you sees a funeral procession, if he is not walking with it, let him stand until it passes him or he passes it, or until the bier is set down before it passes him."
حدثنا قتيبة بن سعيد حدثنا الليث عن نافع عن ابن عمر رضي الله عنهما
عن النبي ﷺ قال إذا رأى أحدكم جنازة فإن لم يكن ماشيا معها فليقم حتى يخلفها أو تخلفه أو توضع من قبل أن تخلفه