Mus'ab bin Sa'd reports from his father (may Allah be pleased with him) that he said: I came to the Prophet (peace and blessings be upon him) on the day of Badr with a sword and said: "O Messenger of Allah! Today Allah Almighty has healed my breast against the enemy, so give me this sword." He (peace and blessings be upon him) said: "This sword is neither mine nor yours." I went away saying: "Today it will be given to someone who has not been tested as I was." Then he (peace and blessings be upon him) called me, and I thought that something had been revealed about me. I came to him (peace and blessings be upon him), and the Prophet (peace and blessings be upon him) said to me: "You asked me for this sword when it was neither mine nor yours; now Allah Almighty has made it mine, and it is now yours." Then he recited the verse: "They ask you about the spoils of war. Say: The spoils of war belong to Allah and the Messenger" [Surah al-Anfal: 1].
Hadith Referenceالسنن الكبرى للبيهقي / كتاب قسم الفيء والغنيمة / 12711