Sunan Ibn Majah, Book 6, Hadith 110 (Ibn Majah 1542)

It was narrated from ‘Amir bin Rabi’ah that the Prophet (ﷺ) said:

“When you see a funeral (procession) stand up for it until it has passed by or it is placed on the ground.”