Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
bayhaqi:7020ʿAlī b. Aḥmad b. ʿAbdān > Aḥmad b. ʿUbayd al-Ṣaffār > Akhū Khaṭṭāb > Ibn Ḥumayd > Mihrān b. Abū ʿUmar > Abū Sinān Saʿīd b. Sinān al-Shaybānī > ʿAlqamah b. Marthad > Ibn Buraydah from his father

[Machine] The Prophet ﷺ passed by a new grave that had just been buried and with him was Abu Bakr. He asked, "Whose grave is this?" Abu Bakr replied, "O Messenger of Allah, this is the grave of Umm Mihan, who used to sweep the dust from the mosque." The Prophet said, "Why didn't you inform me?" They replied, "You were asleep and we did not want to disturb you." The Prophet said, "Do not do this, for my prayer over your deceased is a light for them in their graves." He then lined up his companions and prayed over her. Abu Sinan said, "I mentioned this hadith to 'Amr ibn Murrah, and he said, 'Abu Musa and his companions prayed over a grave after it was buried. Shouldn't we be the first to pray over it?'"  

البيهقي:٧٠٢٠أَخْبَرَنَا عَلِيُّ بْنُ أَحْمَدَ بْنِ عَبْدَانَ أنبأ أَحْمَدُ بْنُ عُبَيْدٍ الصَّفَّارُ ثنا أَخُو خَطَّابٍ ثنا ابْنُ حُمَيْدٍ ثنا مِهْرَانُ بْنُ أَبِي عُمَرَ ثنا أَبُو سِنَانٍ سَعِيدُ بْنُ سِنَانٍ الشَّيْبَانِيُّ عَنْ عَلْقَمَةَ بْنِ مَرْثَدٍ عَنِ ابْنِ بُرَيْدَةَ عَنْ أَبِيهِ

أَنَّ النَّبِيَّ ﷺ مَرَّ عَلَى قَبْرٍ جَدِيدٍ حَدِيثِ عَهْدِ بِدَفْنٍ وَمَعَهُ أَبُو بَكْرٍ فَقَالَ قَبْرُ مَنْ هَذَا فَقَالَ أَبُو بَكْرٍ يَا رَسُولَ اللهِ هَذِهِ أُمُّ مِحْجَنٍ كَانَتْ مُولَعَةً بِلَقْطِ الْقَذَى مِنَ الْمَسْجِدِ فَقَالَ أَفَلَا آذَنْتُمُونِي فَقَالُوا كُنْتَ نَائِمًا فَكَرِهْنَا أَنْ نُهِيجَكَ قَالَ فَلَا تَفْعَلُوا فَإِنَّ صَلَاتِي عَلَى مَوْتَاكُمْ نُورٌ لَهُمْ فِي قُبُورِهِمْ قَالَ فَصَفَّ أَصْحَابَهُ فَصَلَّى عَلَيْهَا قَالَ أَبُو سِنَانٍ فَعَرَضْتُ هَذَا الْحَدِيثَ عَلَى عَمْرِو بْنِ مُرَّةَ فَقَالَ إِنَّ أَبَا مُوسَى وَأَصْحَابَهُ صَلَّوْا عَلَى قَبْرٍ بَعْدَ مَا دُفِنَ وَقَالَ أَلَا سَبَقَ الْقَوْمُ بِالصَّلَاةِ عَلَيْهِ