‘Ubada b. as-Samit said that when God’s messenger followed a bier he did not sit down till the corpse was placed in the side of the grave. On being accosted by a learned Jew and told that that was how they did, God’s messenger sat down and said, “Act differently from them.”
Tirmidhi, Abu Dawud and Ibn Majah transmitted it, Tirmidhi saying that this is a gharib tradition and that Bishr b. Rafi' the transmitter was not strong.
‘Abd ar-Rahman b. Abu Laila said that Sahl b. Hunaif and Qais b. Sa'd were sitting at al-QadisIya when a bier was brought past them. They stood up, and when they were told that it was one of the people of the land, i.e. of the dhimmis( Protected communities such as Jews and Christians), they replied that a bier came past God’s messenger and he stood up. On being told that it contained a Jew he said, “Is it not a soul?”
Nafi‘ Abu Ghalib said he prayed along with Anas b. Malik at a man's funeral and he stood opposite his head. Then some people brought along the bier of a woman of Quraish and said, “Abu Hamza (The kunya of Anas b. Malik, the Prophet’s servant), pray over her,” and he stood opposite the middle of the bier. Al-‘Ala’ b. Ziyad said to him, “Thus did I see God’s messenger do. He stood over the bier in the same position as you did in relation to her and in the same position as you did in relation to the man.” He replied, “That is so.”
Tirmidhi and Ibn Majah transmitted it. In Abu Dawud’s version there is something similar, along with an addition containing the words “He stood at the woman’s buttocks.”