Sayyiduna Imran bin Husayn (may Allah be pleased with him) said: We were with the Messenger of Allah (peace and blessings be upon him) on a journey, and a man among the people became in need of a ritual bath (ghusl). He did not find water, so he performed tayammum and prayed. Then he came upon water within the time of that same prayer, and the man performed ghusl, but the Prophet (peace and blessings be upon him) did not order him to repeat the prayer.
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 15373