Anas b Malik reported
The Messenger of Allah (ﷺ) said: Allah would gather people on the Day of Resurrection and they would be concerned about it, and Ibn Ubaid said. They would get a Divine inspiration about it, and would say: If we could seek intercession with our Lord, we may be relieved from this predicament of ours. He (the Holy Prophet) said: They would come to Adam andsay, Thou art Adam, the father of mankind. Allah created thee with His own hand and breathed unto thee of His Spirit and commanded the angels and they prostrated before thee. So intercede for us with thy Lords, that He may relieve us from this position of ours. He would say: I am not in a position to do this, and would recall his error, and would fight shy of his Lord on account of that; go to Noah the first messenger (after me) sent by Allah. He (the Holy Prophet) said: So they would come to Noah (peace be upon him). He would say: I am not in a position to do that for you, and recall his fault which he had committed, and would fight shy of his Lord on account of that, (and would say): You better go to Ibrahim (peace be upon him) whom Allah took for a friend. They would come to Ibrahim (peace be upon him) and he would say: I am not in a position to do that for you, and would recall his fault that he had committed and would, therefore, fight shy of his Lord on that account (and would say): You better go to Moses (peace be upon him) with whom Allah conversed and con- ferred Torah upon him. He (the Holy Prophet) said: So they would come to Moses (peace be upon him) He would say: I am not in a position to do that for you, and would recall his fault that he had committed and would fight shy of his Lord on account of that (and would say): You better go to Jesus, the Spirit of Allah and His word He would say: I am not in a position to do that for you; you better go to Muhammad (ﷺ), a servant whose former and later sins have been forgiven. He (the narrator) said: The Messenger or Allah (ﷺ) observed: So they would come to me and I would ask the permission of my Lord and it would be granted to me, and when I would see Him, I would fall down in prostration, and He (Allah) would leave me thus as long as He would wish, and then it would be said: O Muhammad, raise your head, say and you would be heard; ask and it would be granted; intercede and intercession would be accepted. Then I would raise my head and extrol my Lord with the praise which my Lord would teach me. I shall then inter- cede, but a limit would be set for me I would bring them out from the Fire and make them enter Paradise (according to the limit). I shall return then ard fall down in pros- tration and Allah would leave me (in that position) as long as He would wish to leave me it would be said: Rise, O Muhammad, say and you would be heard; ask and it would be conferred; intercede and intercession would be granted. I would raise my head and extrol my Lord with praise that He would teach me. I would theft intercede and a limit would be set for me. I would bring them out of the Fire (of Hell) and make them enter Paradise. He (the narrator) said: I do not remember whether he (the Holy Prophet) said at tLe third time or at the fourth time: O my Lord, none has been left in the Fire, but thise restrained by the Holy Qur'an, i e. those who were eternally doomed. Ibn Ubaid said in a narration: Qatada observed: whose everlasting stay was imperative".