We went out with the Messenger of Allah ﷺ for the funeral of a man from the Ansar. When we reached the grave, the niche had not yet been dug. The Messenger of Allah ﷺ sat down, and we sat around him so still that it was as though birds were perched on our heads. In his hand was a stick with which he was poking the ground. Then he raised his head and said, "Seek refuge in Allah from the punishment of the grave," repeating it two or three times.In Jareer's version, the following is added at this point, "He hears the shuffling of their sandals as they turn away when he is asked, 'You there, who is your Lord? What is your religion? Who is your prophet?'"
خرجنا مع رسول الله ﷺ في جنازة رجل من الأنصار، فانتهينا إلى القبر، ولم يلحد فجلس رسول الله ﷺ وجلسنا حوله كأنما على رؤوسنا الطير، وفي يده عود ينكت به في الأرض، فرفع رأسه فقال: استعيذوا بالله من عذاب القبر مرتين أو ثلاثا زاد في حديث جرير ههنا وقال: وإنه ليسمع خفق نعالهم إذا ولوا مدبرين حين يقال له: يا هذا من ربك؟ وما دينك؟ ومن نبيك؟
Abu Dawud (4753) narrated it from Uthman bin Abu Shayba, he said, Jareer narrated to us. Another chain, Hannad bin Sari narrated to us, he said, Muawiya narrated to us, and this is the wording of Hannad, from Amash, from Minhal, from Zazan, from Bara bin Azib, and he mentioned it in a long hadith.The hadith is also found in Zuhd of Hannad bin Sari (339) through this same route. Its chain of transmission is hasan because of Minhal, who is Ibn Amr, for he is "truthful."