Sunan an-Nasai 16684
In-book no 1948أَخْبَرَنِي أَحْمَدُ بْنُ بَكَّارٍ الْحَرَّانِيُّ، قَالَ حَدَّثَنَا بِشْرُ بْنُ السَّرِيِّ، عَنْ سَعِيدٍ الثَّقَفِيِّ، عَنْ عَمِّهِ، زِيَادِ بْنِ جُبَيْرِ بْنِ حَيَّةَ عَنْ أَبِيهِ، عَنِ الْمُغِيرَةِ بْنِ شُعْبَةَ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم " الرَّاكِبُ خَلْفَ الْجَنَازَةِ وَالْمَاشِي حَيْثُ شَاءَ مِنْهَا وَالطِّفْلُ يُصَلَّى عَلَيْهِ " .
It was narrated that Al-Mughirah bin Shu'bah said: "The Messenger of Allah said: "The rider should travel behind the Janazah and the pedestrian may travel wherever he wishes, and the (funeral) prayer should be offered for a child."'