Sahih al-Bukhari Book 10, Hadith 37
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.
Allah's Messenger (ﷺ) went out (of the mosque) when the Iqama had been pronounced and the rows straightened. The Prophet (ﷺ) stood at his Musalla (praying place) and we waited for the Prophet (ﷺ) to begin the prayer with Takbir. He left and asked us to remain in our places. We kept on standing till the Prophet returned and the water was trickling from his head for he had taken a bath (of Janaba).
On the day of Al-Khandaq (the trench), `Umar bin Al-Khattab went to the Prophet (ﷺ) and said, "O Allah's Messenger (ﷺ)! By Allah, I could not pray (the `Asr) till the sun had set." `Umar told this to the Prophet at the time when a fasting person had done Iftar (taken his meals). The Prophet (ﷺ) then went to Buthan and I was with him. He performed ablution and offered the `Asr prayer after the sun had set and then the Maghrib prayer.