‘Abdallah b. Mas'ud reported God’s messenger as saying, “The bier should be followed and should not follow. Those who go in front of it are not accompanying it."
Tirmidhi, Abu Dawud and Ibn Majah transmitted it. Tirmidhi said that Abu Majid the transmitter is unknown.
Abu Huraira reported God’s messenger as saying, “He who follows a bier and carries it three times has accomplished what is ’due to it from him."
Tirmidhi transmitted it, saying that this is a gharib tradition. In Sharh as-sunna it is reported that the Prophet carried the bier of Sa‘d b. Mu'adh between the two poles.
Al-Mughira b. Shu'ba reported the Prophet as saying, “A rider should go behind the bier, and those on foot should walk behind it, in front of it, on its right and on its left keeping near it. Prayer should be said over an abortion and forgiveness and mercy supplicated for its parents.”
Abu Dawud transmitted it. In the version of Ahmad, Tirmidhi, Nasa’i and Ibn Majah he said, “The rider should go behind the bier and those on foot wherever they wish round about it, and prayer should be said over an infant." In al-Masabih it is given on the authority of al-Mughira b. Ziyad.