The Messenger of Allah ﷺ said, "I know the last person to come out of the Fire. He is a man who will crawl out of it, and he will say, 'My Lord, the people have taken all the dwellings.' He will be told, 'Go and enter Paradise.' So he will go to enter it, but he will find that the people have already taken the dwellings. He will return and say, 'My Lord, the people have taken all the dwellings.' He will be asked, 'Do you remember the time you were in?' He will reply, 'Yes.' He will be told, 'Make a wish.' So he will make a wish, and he will be told, 'You shall have what you wished for, and ten times the world along with it.' He will say, 'Are you mocking me, and You are the King?'"The narrator said, I saw the Messenger of Allah ﷺ laugh until his back teeth showed.
حدثنا هناد حدثنا أبو معاوية عن الأعمش عن إبراهيم عن عبيدة السلماني
قال رسول الله ﷺ إني لأعرف آخر أهل النار خروجا رجل يخرج منها زحفا فيقول يا رب قد أخذ الناس المنازل قال فيقال له انطلق فادخل الجنة قال فيذهب ليدخل فيجد الناس قد أخذوا المنازل فيرجع فيقول يا رب قد أخذ الناس المنازل قال فيقال له أتذكر الزمان الذي كنت فيه فيقول نعم فيقال له تمن قال فيتمنى فيقال له فإن لك ما تمنيت وعشرة أضعاف الدنيا قال فيقول أتسخر بي وأنت الملك قال فلقد رأيت رسول الله ﷺ ضحك حتى بدت نواجذه
Agreed upon (by Bukhari and Muslim), and Muslim narrated it in the Book of Faith, chapter on the last of the people of Hell to come out, hadith no. 186, from the hadith of Abu Muawiya, and Bukhari, hadith no. 6571, from the hadith of Ibrahim Nakhai, with the same wording.