Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both) said: I was with the Messenger of Allah (peace and blessings be upon him) when he (peace and blessings be upon him) passed by a grave that was newly made. He (peace and blessings be upon him) said: "Whose grave is this?" It was said: It is the grave of so-and-so. He (peace and blessings be upon him) dismounted, and the Companions formed a row behind him (peace and blessings be upon him) and prayed the funeral prayer over him, and I was among those who prayed over him.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الجنائز / 7009