Hadith 146:14
Isma'il narrated to us, Ayyub informed us, from Nafi', from Ibn 'Umar, from 'Amir ibn Rabi'ah, who said: The Messenger of Allah (peace and blessings of Allah be upon him) said: "If you see a funeral procession, and you are not walking with it, then stand up for it until it passes you or it is placed down." He said: "Ibn 'Umar would sometimes go ahead of the funeral procession and sit down until, when he saw it approaching, he would stand up until it was placed down, and sometimes it would pass him."
حدثنا إسماعيل، أخبرنا أيوب، عن نافع، عن ابن عمر، عن عامر بن ربيعة، قال: قال رسول الله صلى الله عليه وسلم: " إذا رأيت جنازة ، فإن لم تك ماشيا معها، فقم لها حتى تخلفك أو توضع " قال: " فكان ابن عمر ربما تقدم الجنازة، فقعد حتى، إذا رآها قد أشرفت قام حتى توضع، وربما سترته "