We asked the Messenger of Allah ﷺ about walking behind the funeral procession.He said, "Anything less than a brisk pace. If the deceased was righteous, you are hastening him to a good end, and if he was wicked, then may none but the people of the Fire be cast far away. The funeral is followed, not followed by others, and whoever walks ahead of it is not part of it."
حدثنا محمود بن غيلان حدثنا وهب بن جرير عن شعبة عن يحيى إمام بني تيم الله عن أبي ماجد
سألنا رسول الله ﷺ عن المشي خلف الجنازة قال ما دون الخبب فإن كان خيرا عجلتموه وإن كان شرا فلا يبعد إلا أهل النار الجنازة متبوعة ولا تتبع وليس منها من تقدمها