وَعَنْ أَبِي هُرَيْرَةَ رَضِيَ اللَّهُ عَنْهُ قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: «أَسْرِعُوا بِالْجَنَازَةِ فَإِنْ تَكُ صَالِحَةً فَخَيْرٌ تُقَدِّمُونَهَا إِلَيْهِ وَإِنْ تَكُ سِوَى ذَلِكَ فشر تضعونه عَن رقابك»

Abu Huraira reported God’s messenger as saying, “Walk quickly at a funeral, for if the dead person was good it is a good condition to which you are sending him on, but if he was otherwise it is an evil of which you are ridding yourselves.”

(Bukhari and Muslim.)