It is narrated from Sayyidah Aishah (may Allah be pleased with her) that she borrowed a necklace from Asma (may Allah be pleased with her) and it was lost. The Messenger of Allah (peace and blessings be upon him) sent some of the Companions to search for it. The time of prayer came upon them and they prayed without ablution. When they came to the Prophet (peace and blessings be upon him), they complained about this incident, and so the verse of tayammum was revealed. Usayd bin Hudayr (may Allah be pleased with him) said: May Allah Almighty grant you the best reward! By Allah, no (difficult) matter has ever befallen you but that Allah made a way out of it for you and placed blessing in it for the Muslims.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الطهارة / 1028