Amir ibn Rabia reported: The Messenger of Allah, peace and blessings be upon him, said, “When you see a funeral procession, then stand up for it until it passes or the deceased is placed in the grave.”
Source: Sahih Bukhari 1245, Sahih Muslim 958
Grade: Muttafaqun Alayhi (authenticity agreed upon) according to Al-Bukhari and Muslim
عَنْ عَامِرِ بْنِ رَبِيعَةَ قَالَ قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ إِذَا رَأَيْتُمْ الْجَنَازَةَ فَقُومُوا لَهَا حَتَّى تُخَلِّفَكُمْ أَوْ تُوضَعَ
1245 صحيح البخاري كتاب الجنائز باب القيام للجنازة
958 صحيح مسلم كتاب الجنائز باب القيام للجنازة
Source: Daily Hadith