Amir bin Rabia reported that the Messenger of Allah ﷺ said, "When you see a funeral procession, stand up for it until it passes you or is set down."Qutayba narrated to us, Layth narrated to us, from Nafi, from Ibn Umar, from Amir bin Rabia, from the Messenger of Allah ﷺ.
حدثنا قتيبة حدثنا الليث عن ابن شهاب عن سالم بن عبد الله عن أبيه
عن النبي ﷺ حدثنا قتيبة حدثنا الليث عن نافع عن ابن عمر عن عامر بن ربيعة عن رسول الله ﷺ قال إذا رأيتم الجنازة فقوموا لها حتى تخلفكم أو توضع
Agreed upon [by Bukhari and Muslim]. Muslim narrated it in the Book of Funerals, chapter on standing for the funeral procession, no. 958, from Qutayba, and Bukhari, no. 1307, from the hadith of Ibn Shihab Zuhri, with the same wording. On this topic there are also narrations from Abu Saeed [coming up: 1043], and Jabir [Bukhari, no. 1311, and Muslim, no. 960], and Sahl bin Hunayf [Bukhari, nos. 1312, 1313, and Muslim, no. 961], and Qays bin Saad [Muslim, no. 961], and Abu Hurairah [Bukhari, no. 1309].