Najiyah bin Ka'b (may Allah have mercy on him) said that Sayyiduna Abdullah bin Mas'ud and Sayyiduna Ammar (may Allah be pleased with them both) disputed about a man who becomes junub (in a state of major ritual impurity) and does not find water. Sayyiduna Abdullah bin Mas'ud (may Allah be pleased with him) said: He does not pray until he finds water. Sayyiduna Ammar (may Allah be pleased with him) said: I was among the camels (in their pasture) and I became junub, and I had no water, so I rolled about (in the dust) as an animal does. Then I came to the Prophet (peace and blessings be upon him) and mentioned (this incident) to him, and he (peace and blessings be upon him) said: "Tayammum with clean earth would have sufficed you; when you find water, take a ritual bath."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الطهارة / 1049