They went out with the Messenger of Allah ﷺ one day, and he saw a fresh grave. He asked, "What is this?"They replied, "This is so-and-so, the freedwoman of the tribe of so-and-so." The Messenger of Allah ﷺ recognized her. They said, "She died at midday while you were taking your nap, and we did not wish to wake you for her sake."The Messenger of Allah ﷺ stood, and the people lined up behind him, and he pronounced four takbirs over her. Then he said, "Whenever someone among you dies while I am still living among you, inform me of it, for my prayer over them is a mercy."
أخبرنا عبيد الله بن سعيد أبو قدامة قال حدثنا عبد الله بن نمير قال حدثنا عثمان بن حكيم عن خارجة بن زيد بن ثابت
أنهم خرجوا مع رسول الله ﷺ ذات يوم فرأى قبرا جديدا فقال ما هذا قالوا هذه فلانة مولاة بني فلان فعرفها رسول الله ﷺ ماتت ظهرا وأنت نائم قائل فلم نحب أن نوقظك بها فقام رسول الله ﷺ وصف الناس خلفه وكبر عليها أربعا ثم قال لا يموت فيكم ميت ما دمت بين أظهركم إلا آذنتموني به فإن صلاتي له رحمة
No references are available.
[Its chain is sahih] Ibn Majah narrated it in "The Book of Funerals," chapter on prayer over the grave, hadith no. 1528, from the hadith of Uthman bin Hakeem, through him. It is also in Al-Kubra, hadith no. 2149, and Ibn Hibban graded it sahih, hadith nos. 759, 761. See also the preceding hadith, no. 1921.