Abu Dawud Book 1, Hadith Number 320.

Chapter : A person who is sexually defiled is permitted to eat anything before washing.

Narated By Ammar ibn Yasir : The Apostle of Allah (PBUH) encamped at Ulat al-Jaysh and ‘Aisha was in his company. Her necklace of onyx of Zifar was broken (and fell somewhere). The people were detained to make a search for that necklace until the dawn broke. There was no water with the people, therefore Abu Bakr became angry with her and said: You detained the people and they have no water with them.

Thereupon Allah, the Exalted, sent down revelation about it to His Apostle (PBUH) granting concession to purify themselves with pure earth. Then the Muslims stood up with the Apostle of Allah (PBUH) and struck the ground with their hands and then they raised their hands, and did not take any earth (in their hands). Then they wiped with them their faces and hands up to the shoulders, and from their palms up to the armpits.