The Messenger of Allah ﷺ entered the garden of the palm trees of Banu al-Najjar. He heard a voice and was terrified. He asked: Who are the people buried in these graves? The people replied: Messenger of Allah! These are some people who died in the pre-Islamic times. He said: Seek refuge in Allah from the punishment of the fire, and the trail of Antichrist. They asked: Why is it that, Messenger of Allah? He said: When a man is placed in his grave, an angel comes to him and says to him: Whom did you worship? Allah then guides him and he says: I worshiped Allah. He is then asked: What was your opinion of this man? He replies: He is Allah’s servant and His Apostle. He will not then be asked about anything else. He will then be taken to his abode in Hell and will be told: This was your abode in Hell, but Allah protected you and had mercy on you substituted for you an abode in Paradise for it. He will say: Leave me so that I may go and give glad tidings to my family. He will be told: Dwell. When an infidel is placed in his grave, an angel comes to him, reprimands him and asks him: Whom did you worship? He replies: I do not know. He will be told: You neither knew nor did you follow(the believers). He is then asked: What was your opinion on this man? He replies: I held the opinion that the other people held. He will then give him a blow between his ears with an iron hammer and will utter a shout which will be heard by all the creatures(near him) with the exception of men and jinn. (Using translation from Abū Dāʾūd 4751)
"إِنَّ الْمُؤْمِنَ إِذَا وُضِعَ فِى قَبْرِه أَتَاهُ مَلَكٌ فَيَقُولُ لَهُ: مَا كُنْتَ تَعْبُدُ؟ فَإِن اللهُ هَدَاهُ قَالَ: كُنْتُ أَعْبُدُ اللهَ، فَيُقَالُ لَهُ: مَا كُنْتَ تَقُولُ في هَذا الرَّجُل؟ فَيَقُولُ: هُو عَبْدُ اللهِ وَرَسُولهُ، فَما يُسْأَلُ عَنْ شَئٍ غَيْرَها فَيُنْطَلَقُ به إِلى بَيْت كَانَ لَهُ في النَّار، فَيُقَالُ لَهُ: هَذا بَيْتُكَ كَانَ فِى النَّارِ، وَلكِنَّ الله عَصَمكَ وَرَحمَكَ، فَأَبْدَلَكَ بِه بيْتًا فِى الْجَنَّةِ، فَيَقُولُ: دَعُونى حتَّى أَذْهَبَ فَأُبَشِّرَ أَهْلِى - فَيُقَالُ لَهُ: اسْكُنْ وَإنَّ الْكافِرَ إِذَا وُضِعَ فِى قَبْرِه أَتَاهُ مَلَكٌ فَيَنْتَهِرُهُ فَيَقُولُ لَهُ مَا كُنْتَ تَعْبُدُ؟ فَيَقُولُ: لا أَدْرى. فَيُقَالُ لَهُ: لا دَرَيْتَ، وَلا تَلَيْتَ، فَيُقَالُ: ما كُنْتَ تَقُولُ فِى هَذا الرَّجُلِ؟ فَيَقُولُ: كُنْتُ أَقُولُ ما يَقُولُ النَّاسُ، فَيَضْرِبُهُ بِمِطْرَاقٍ مِنْ حَدِيدٍ بَيْنَ أُذُنَيه فيَصِيحُ صَيْحَةً يَسْمَعُها الْخَلْقُ غَيْرَ الثَّقَلَين ".