It is narrated from Sayyiduna Sahl bin al-Hanzaliyyah (may Allah be pleased with him) that when the Messenger of Allah (peace and blessings be upon him) set out toward Hunayn, he said: "Who will stand guard over us tonight?" Sayyiduna Anas bin Abi Marthad al-Ghanawi (may Allah be pleased with him) said: O Messenger of Allah! I will. He (peace and blessings be upon him) said: "Very well." When morning came, he (peace and blessings be upon him) came out to lead the prayer and said: "Have you found out anything about your horseman?" They said: No! He (peace and blessings be upon him) began leading the prayer and kept glancing toward the mountain pass. When he (peace and blessings be upon him) concluded with the salam, he said: "Your horseman has arrived." When he (Sayyiduna Anas bin Abi Marthad, may Allah be pleased with him) came, he (peace and blessings be upon him) said: "Perhaps you dismounted." He said: No, except to pray or to relieve myself. Then he said: I climbed up to look over the two mountain passes, and there were the Hawazin with their women in howdahs, their sheep and their camels, heading toward Hunayn. The Messenger of Allah (peace and blessings be upon him) said: "In sha' Allah (if Allah wills), tomorrow these will be spoils of war for the Muslims." Then he mentioned the long hadith.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 2250