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.
‘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.
Jabir b. Samura said the Prophet was brought an unsaddled horse which he rode when he went away after the funeral of Ibn ad-Dahdah, and they went on foot around him.