(17) بَاب عَرْضِ مَقْعَدِ الْمَيِّتِ مِنْ الْجَنَّةِ أَوْ النَّارِ عَلَيْهِ وَإِثْبَاتِ عَذَابِ الْقَبْرِ وَالتَّعَوُّذِ مِنْهُ
Al-Bara' b. `Azib reported Allah's Apostle (ﷺ) as saying:
This verse: "Allah grants steadfastness to those who believe with firm word," was revealed in connection with the torment of the grave. It would be said to him: Who is your Lord? And he would say: Allah is my Lord and Muhammad is my Apostle (ﷺ), and that is (what is implied) by the words of Allah, the Exalted: "Allah keeps steadfast those who believe with firm word in this world and in the Hereafter."
Reference: Sahih Muslim 2871 a
In-book reference: Book 53, Hadith 88
USC-MSA web (English) reference(deprecated numbering scheme): Book 40, Hadith 6865