Sunan an-Nasa'i, Book 21, Hadith 97 (Nasa'i 1919)

It was narrated from Abu Sa'eed that the Messenger of Allah said:

"When a funeral passes by you, stand up, and whoever follows it, let him not sit down until it is put down (in the grave)."