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.”
It was narrated that Abu Hurairah said: “A funeral has passed by the Prophet (ﷺ) and he stood up and said: ‘Stand up out of recognition of the enormity of death.’”
It was narrated that ‘Ali bin Abu Talib said: “The Messenger of Allah (ﷺ) stood up for a funeral, and we stood up, until he sat down, then we sat down.”
It was narrated that ‘Ubadah bin Samit said: “When the Messenger of Allah (ﷺ) followed a funeral, he would not sit down until it had been placed in the niche-grave. A rabbi came to him and said: ‘This is what we do, O Muhammad!’ So the Messenger of Allah (ﷺ) sat down and said: ‘Be different from them.’”