(14) باب الإِمَامِ يَذْكُرُ بَعْدَ قِيَامِهِ فِي مُصَلاَّهُ أَنَّهُ عَلَى غَيْرِ طَهَارَةٍ
It was narrated that Abu Hurairah said:
"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."
Reference: Sunan an-Nasa'i 792
In-book reference: Book 10, Hadith 16
English translation: Vol. 1, Book 10, Hadith 793