The Messenger of Allah ﷺ said, "You will be gathered barefoot, naked, and uncircumcised." Then he recited, "As We began the first creation, We will repeat it. A promise binding upon Us, and We shall surely do it" [Anbiya 21:104]."The first to be clothed will be Ibrahim. Then men from among my companions will be seized and taken to the right and to the left, and I will say, 'My companions!' It will be said, 'They never ceased turning back on their heels from the moment you left them.' So I will say what the righteous servant Isa son of Maryam said, 'I was a witness over them as long as I remained among them, but when You took me, You were the watcher over them, and You are witness over all things. If You punish them, they are Your servants, and if You forgive them, You are indeed the Mighty, the Wise'" [Surah Maidah 5:117–118].
قال رسول الله ﷺ: تحشرون حفاة عراة غرلا ثم قرأ: {كما بدأنا أول خلق نعيده وعدا علينا إنا كنا فعلين} [الأنبياء: ١٠٤] فأول من يكسى إبراهيم ثم يؤخذ برجال من أصحابي ذات اليمين وذات الشمال فأقول أصحابي فيقال: إنهم لم يزالوا مرتدين على أعقابهم منذ فارقتهم فأقول كما قال العبد الصالح عيسى ابن مريم: {وكنت عليهم شهيدا ما دمت فيهم فلما توفيتني كنت أنت الرقيب عليهم وأنت على كل شيء شهيد إن تعذبهم فإنهم عبادك وإن تغفر لهم فإنك أنت العزيز الحكيم} [سورة المائدة: ١١٧-١١٨].
Bukhari narrated it in the Hadiths of the Prophets (3447) and Muslim in the Book of Paradise (2860:58), both from the hadith of Mughira bin Numan, from Saeed bin Jubayr, from Ibn Abbas, who mentioned it. The wording given here is Bukhari's.