It is narrated from Sayyiduna Ibn Mas'ud (may Allah be pleased with him) that once we asked the Prophet (peace and blessings be upon him) about walking with a funeral, so the Prophet (peace and blessings be upon him) said: "The funeral should be followed, not preceded." (The funeral should be in front and those walking should be behind it.)
Hadith Referenceمسند احمد / مسند المكثرين من الصحابة / 3585
Hadith Gradingحکم دارالسلام:إسناده ضعيف لجهالة أبى ماجد الحنفي وضع يحيى الجابر