It is narrated from Sahl Ibn al-Hanzaliyyah (may Allah be pleased with him) that they set out with the Messenger of Allah (peace and blessings be upon him) on the day of Hunayn, and travelled at a fast pace until evening came and the time of prayer arrived with the Messenger of Allah (peace and blessings be upon him). Then a horseman came and said: O Messenger of Allah! I went ahead of you until I climbed such-and-such a mountain, and I saw Hawazin, all of them to the last man, with their women, their livestock and their sheep, gathered towards Hunayn. The Messenger of Allah (peace and blessings be upon him) smiled and said: "That will be the spoils of the Muslims tomorrow, if Allah wills." Then he said: "Who will guard us tonight?" Sayyiduna Anas bin Abi Marthad al-Ghanawi (may Allah be pleased with him) said: I will, O Messenger of Allah! He (peace and blessings be upon him) said: "Mount." So he mounted a horse of his and came to the Messenger of Allah (peace and blessings be upon him), and the Messenger of Allah (peace and blessings be upon him) said to him: "Head for this mountain pass until you reach its top, and do not let us be taken by surprise from your side tonight." When morning came, the Messenger of Allah (peace and blessings be upon him) went out to his place of prayer and prayed two rak'ahs, then said: "Have you had any news of your horseman?" A man said: O Messenger of Allah! We have had no news of him. Then the iqamah for the prayer was called, and the Messenger of Allah (peace and blessings be upon him), even while in the prayer, kept turning to look towards the mountain pass, until, when he (peace and blessings be upon him) had completed the prayer and said the salam, he said: "Rejoice, for your horseman has come." We began looking through the trees into the mountain pass, and indeed he had come, until he stopped before the Messenger of Allah (peace and blessings be upon him) and said: I went on until I reached the top of this mountain pass, where you (peace and blessings be upon him) had ordered me; when morning came, I climbed both mountain passes and looked, but I did not see anyone. The Messenger of Allah (peace and blessings be upon him) said: "Did you dismount during the night?" He said: No, except to pray or to relieve myself. The Messenger of Allah (peace and blessings be upon him) said to him: "You have made (Paradise) obligatory for yourself; there is no harm upon you if you do no (further voluntary) deeds after this."
Hadith Referenceالمعجم الكبير للطبراني / باب السين / 5598