Sahih Muslim Book 4, Hadith Number 2102.

Chapter : Abrogation of the act of standing up the bier.

It is narrated on the authority of Muhammad b. Munkadir that he said: I heard from Mas’ud b. al-Hakam who narrated it on the authority of Hadrat ‘Ali that he said: We saw the Holy Prophet (may peace be upon him) stood up for a (bier) and we also stood up; he sat down and we too sat down.