Abu Hurairah reported,

The Messenger of Allah ﷺ recited the verse "Allah keeps firm those who believe with the firm word in the worldly life and in the Hereafter" [Ibrahim 14:27], then he said, "This refers to when a person is asked in the grave, 'Who is your Lord? What is your religion? Who is your Prophet?' He will reply, 'Allah is my Lord, Islam is my religion, and Muhammad is my Prophet. He came to us with clear proofs from Allah, so I believed in him and affirmed his truthfulness.' Then it will be said to him, 'You have spoken the truth. Upon this you lived, upon this you died, and upon this you shall be raised, if Allah wills.'"

Azami 3873

Hasan

عن أبي هريرة قال

تلا رسول الله ﷺ: {يثبت الله الذين ءامنوا بالقول الثابت في الحيوة الدنيا وفي الآخرة} فقال: ذلك إذا قيل له في القبر: من ربك؟ وما دينك؟ ومن نبيك؟ فيقول: الله ربي والإسلام ديني، ومحمد نبيي جاءنا بالبينات من عند الله فآمنت به، وصدقته فيقال: صدقت على هذا حبيت، وعليه تبعث إن شاء الله.

الأعظمي 3873حسن
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Funerals
Chapter
Conditions of the deceased in the grave
Section
Allah keeps firm those who believe with the firm word in the grave, and Allah leaves astray the wrongdoers in the grave
Numbering
Jami al-Kamil 3873 (2nd edition)
Azami 3873