Once Iqama was pronounced and the people had straightened the rows, Allah's Messenger (ﷺ) went forward (to lead the prayer) but he was Junub, so he said, "Remain in your places." And he went out, took a bath and returned with water trickling from his head. Then he led the prayer.
Reference: Sahih al-Bukhari 640 In-book : Book 10, Hadith 37 USC-MSA web (English) : Vol. 1, Book 11, Hadith 613 (deprecated)
Help us gift a modern, ad-free Islamic application for the Muslim Ummah. Your donation will be recorded as Sadaqah Jariyah in your book of deeds, In Sha Allah.