"The Iqamah for prayer was said and the people stood in rows, and the Messenger of Allah ﷺ came out. Then when he stood in the place where he prayed, he remembered that he had not performed Ghusl. He said to the people: 'Stay where you are.' Then he went back to his house, then he came out with his head dripping with water. He performed Ghusl while we were standing in our rows." (Using translation from Nasāʾī 792)
أُقِيمَتِ الصَّلَاةُ وَصَفَّ النَّاسُ صُفُوفَهُمْ وَخَرَجَ رَسُولُ اللهِ ﷺ حَتَّى إِذَا قَامَ فِي مُصَلَّاهُ ذَكَرَ أَنَّهُ لَمْ يَغْتَسِلْ فَقَالَ لِلنَّاسِ «مَكَانَكُمْ» ثُمَّ رَجَعَ إِلَى بَيْتِهِ فَخَرَجَ عَلَيْنَا يَنْطِفُ رَأْسَهُ قَدِ اغْتَسَلَ وَنَحْنُ صُفُوفٌ