Sulayman Shaybani reported,

I heard Shaybi say, "Someone who passed by an isolated grave with the Prophet ﷺ informed me that the Prophet ﷺ led them in prayer, and they lined up in rows behind him."I asked, "Abu Amr, who narrated this to you?"He replied, "Ibn Abbas."In another narration from Ibn Abbas, he said, "A man whom the Messenger of Allah ﷺ used to visit during his illness died at night, and they buried him during the night. When morning came, they informed the Messenger of Allah ﷺ of his death."He asked, "What prevented you from letting me know?"They replied, "It was night and very dark, and we did not want to burden you."So he went to the grave and performed the funeral prayer over him.

Azami 3729

Sahih

عن سليمان الشيباني قال

سمعت الشعبي قال: أخبرني من مر مع النبي ﷺ على قبر منبوذ فأمهم، وصفوا عليه، فقلت: يا أبا عمرو! من حدثك؟ قال: ابن عباس. وفي رواية: عن ابن عباس قال: مات إنسان كان رسول الله ﷺ يعوده فمات بالليل، فدفنوه ليلا، فلما أصبح أخبروه فقال: ما منعكم أن تعلموني؟ قالوا: كان الليل فكرهنا- وكانت ظلمة- أن نشق عليك، فأتى قبره فصلى عليه.

الأعظمي 3729صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Funerals
Chapter
Prayer over the deceased
Section
Prayer over the grave after burial
Numbering
Jami al-Kamil 3729 (2nd edition)
Azami 3729