Messenger of Allah ﷺ said, "Allah will gather all the people on the Day of Resurrection and they will say, 'Let us request someone to intercede for us with our Lord so that He may relieve us from this place of ours.' Then they will go to Adam and say, 'You are the one whom Allah created with His Own Hands, and breathed in you of His soul, and ordered the angels to prostrate to you; so please intercede for us with our Lord.' Adam will reply, 'I am not fit for this undertaking, and will remember his sin, and will say, 'Go to Noah, the first Apostle sent by Allah' They will go to him and he will say, 'I am not fit for this undertaking', and will remember his sin and say, 'Go to Abraham whom Allah took as a Khalil. They will go to him (and request similarly). He will reply, 'I am not fit for this undertaking,' and will remember his sin and say, 'Go to Moses to whom Allah spoke directly.' They will go to Moses and he will say, 'I am not fit for this undertaking,' and will remember his sin and say, 'Go to Jesus.' They will go to him, and he will say, 'I am not fit for this undertaking, go to Muhammad as Allah has forgiven his past and future sins.' They will come to me and I will ask my Lord's permission, and when I see Him, I will fall down in prostration to Him, and He will leave me in that state as long as (He) Allah will, and then I will be addressed. 'Raise up your head (O Muhammad)! Ask, and your request will be granted, and say, and your saying will be listened to; intercede, and your intercession will be accepted.' Then I will raise my head, and I will glorify and praise my Lord with a saying(i.e. invocation) He will teach me, and then I will intercede, Allah will fix a limit for me (i.e., certain type of people for whom I may intercede), and I will take them out of the (Hell) Fire and let them enter Paradise. Then I will come back (to Allah) and fall in prostration, and will do the same for the third and fourth times till no-one remains in the (Hell) Fire except those whom the Qur'an has imprisoned therein." (The sub-narrator, Qatada used to say at that point, "...those upon whom eternity (in Hell) has been imposed.") (See Hadith No. 3, Vol 6).
قَالَ رَسُولُ اللَّهِ ﷺ يَجْمَعُ اللَّهُ النَّاسَ يَوْمَ الْقِيَامَةِ فَيَقُولُونَ لَوِ اسْتَشْفَعْنَا عَلَى رَبِّنَا حَتَّى يُرِيحَنَا مِنْ مَكَانِنَا فَيَأْتُونَ آدَمَ فَيَقُولُونَ أَنْتَ الَّذِي خَلَقَكَ اللَّهُ بِيَدِهِ وَنَفَخَ فِيكَ مِنْ رُوحِهِ وَأَمَرَ الْمَلاَئِكَةَ فَسَجَدُوا لَكَ فَاشْفَعْ لَنَا عِنْدَ رَبِّنَا فَيَقُولُ لَسْتُ هُنَاكُمْ وَيَذْكُرُ خَطِيئَتَهُ وَيَقُولُ ائْتُوا نُوحًا أَوَّلَ رَسُولٍ بَعَثَهُ اللَّهُ فَيَأْتُونَهُ فَيَقُولُ لَسْتُ هُنَاكُمْ وَيَذْكُرُ خَطِيئَتَهُ ائْتُوا إِبْرَاهِيمَ الَّذِي اتَّخَذَهُ اللَّهُ خَلِيلاً فَيَأْتُونَهُ فَيَقُولُ لَسْتُ هُنَاكُمْ وَيَذْكُرُ خَطِيئَتَهُ ائْتُوا مُوسَى الَّذِي كَلَّمَهُ اللَّهُ فَيَأْتُونَهُ فَيَقُولُ لَسْتُ هُنَاكُمْ فَيَذْكُرُ خَطِيئَتَهُ ائْتُوا عِيسَى فَيَأْتُونَهُ فَيَقُولُ لَسْتُ هُنَاكُمْ ائْتُوا مُحَمَّدًا ﷺ فَقَدْ غُفِرَ لَهُ مَا تَقَدَّمَ مِنْ ذَنْبِهِ وَمَا تَأَخَّرَ فَيَأْتُونِي فَأَسْتَأْذِنُ عَلَى رَبِّي فَإِذَا رَأَيْتُهُ وَقَعْتُ سَاجِدًا فَيَدَعُنِي مَا شَاءَ اللَّهُ ثُمَّ يُقَالُ ارْفَعْ رَأْسَكَ سَلْ تُعْطَهْ وَقُلْ يُسْمَعْ وَاشْفَعْ تُشَفَّعْ فَأَرْفَعُ رَأْسِي فَأَحْمَدُ رَبِّي بِتَحْمِيدٍ يُعَلِّمُنِي ثُمَّ أَشْفَعُ فَيَحُدُّ لِي حَدًّا ثُمَّ أُخْرِجُهُمْ مِنَ النَّارِ وَأُدْخِلُهُمُ الْجَنَّةَ ثُمَّ أَعُودُ فَأَقَعُ سَاجِدًا مِثْلَهُ فِي الثَّالِثَةِ أَوِ الرَّابِعَةِ حَتَّى مَا بَقِيَ فِي النَّارِ إِلاَّ مَنْ حَبَسَهُ الْقُرْآنُ