"إن المؤمن إذا وضع في قبره أتاه ملك فيقول له: ¤ ما كنت تعبد؟ فإن الله هداه قال: كنت أعبد الله فيقول له: ما كنت تقول في هذا الرجل؟ فيقول: هو عبد الله ورسوله فما يسأل عن شيء غيرها فينطلق به إلى بيت كان في النار فيقال له: هذا بيتك كان في النار ولكن الله عصمك ورحمك فأبدلك به بيتا في الجنة فيقول: دعوني حتى أذهب فأبشر أهلي فيقال له: اسكن; وإن الكافر إذا وضع في قبره أتاه ملك فينتهره فيقول له: ما كنت تعبد؟ فيقول: لا أدري فيقال له: لا دريت ولا تليت فيقال: فما كنت تقول في هذا الرجل؟ فيقول: كنت أقول ما تقول الناس فيضربه بمطراق من حديد بين أذنيه فيصيح صيحة يسمعها الخلق غير الثقلين"
The Prophet (peace and blessings be upon him) said:
"Indeed, when the believer is placed in his grave, an angel comes to him and says to him: 'Whom did you worship?' If Allah has guided him, he says: 'I used to worship Allah.' Then the angel asks him: 'What did you used to say about this man (that is, Muhammad (peace and blessings be upon him))?' He says: 'He is the servant of Allah and His Messenger.' So he is not asked about anything besides this. Then he is taken to a house that was in the Fire, and it is said to him: 'This was your abode in Hell, but Allah protected you and had mercy on you, so He has exchanged it for you with a house in Paradise.' He says: 'Let me go so that I may give this glad tidings to my family.' It is said to him: 'Stay here in peace.' And indeed, when the disbeliever is placed in his grave, an angel comes to him, rebukes him and asks: 'Whom did you worship?' He says: 'I do not know.' It is said to him: 'You neither knew yourself nor followed those who read.' Then he is asked: 'What did you used to say about this man?' He says: 'I used to say what the people said.' So the angel strikes him between his two ears with an iron hammer, and he lets out a scream that all creatures hear except jinn and mankind."
Hadith Referenceصحیح الجامع الصغیر / حرف الألف / 1930