Sunan an-Nasa'i #1948 · The Book of Funerals

Sunan an-Nasa'iIt was narrated from Al-Mughirah bin Shu'bah that
Sunan an-Nasa'i · Book 21 · The Book of Funerals
Sunan an-Nasa'i · كتاب 21 · كتاب الجنائز
the Messenger of Allah said: "The rider should move behind the Janazah and the pedestrian may walk wherever he wishes, and the (funeral) prayer should be offered for a child
أَخْبَرَنَا إِسْمَاعِيلُ بْنُ مَسْعُودٍ، قَالَ حَدَّثَنَا خَالِدٌ، قَالَ حَدَّثَنَا سَعِيدُ بْنُ عُبَيْدِ اللَّهِ، قَالَ سَمِعْتُ زِيَادَ بْنَ جُبَيْرٍ، يُحَدِّثُ عَنْ أَبِيهِ، عَنِ الْمُغِيرَةِ بْنِ شُعْبَةَ، أَنَّهُ ذَكَرَ أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَالَ ‏
"‏ الرَّاكِبُ خَلْفَ الْجَنَازَةِ وَالْمَاشِي حَيْثُ شَاءَ مِنْهَا وَالطِّفْلُ يُصَلَّى عَلَيْهِ ‏"‏ ‏.‏
Reference : Sunan an-Nasa'i 1948In-book reference : Book 21, Hadith 131