Sayyiduna Imran bin Husain (may Allah be pleased with him) says: One night the Prophet (peace and blessings be upon him) slept, and when the sun rose he woke up, got up, mounted his ride, traveled a little ahead, then dismounted. Then he told the mu’adhdhin to give the adhan, so he gave the adhan and the iqamah, and the Prophet (peace and blessings be upon him) performed the prayer. A man was sitting separately, so the Prophet (peace and blessings be upon him) asked him: “What prevented you from praying with us?” He said: O Messenger of Allah! I became junub and we did not have any water. The Prophet (peace and blessings be upon him) said: “Perform tayammum with clean earth and offer the prayer, and when you find water, then perform ghusl.”
Related hadith on this topic