The Messenger of Allah ﷺ saw a man standing apart who had not prayed with the congregation, so he asked, "So-and-so, what kept you from praying with the people?"The man replied, "Messenger of Allah, I am in a state of major ritual impurity and there is no water."He said, "Use clean earth, for that will suffice you."
أن رسول الله ﷺ رأى رجلا معتزلا لم يصل في القوم، فقال: يا فلان، ما منعك أن تصلي في القوم؟ فقال: يا رسول الله، أصابتني جنابة ولا ماء. فقال: عليك بالصعيد فإنه يكفيك.