Abu Hurairah reported,

The Messenger of Allah ﷺ said, "One of the prophets went out on a military campaign, and he said to his people, 'Let no man follow me who has married a woman and wishes to consummate the marriage with her but has not yet done so, nor anyone who has built a house but has not yet put up its roof, nor anyone who has bought sheep or pregnant camels and is awaiting their offspring.'"So he set out on the campaign, and he drew near the town around the time of Asr prayer, or close to it. He said to the sun, 'You are under command and I am under command. Allah, hold it back for me a while.' So it was held back for him until Allah granted him victory."They gathered what they had taken as spoils, and the fire came forward to consume it, but it refused to consume it. He said, 'There is stolen booty among you. Let one man from each tribe pledge allegiance to me.' So they pledged allegiance to him, and the hand of one man stuck to his hand. He said, 'The stolen booty is among you. Let your tribe pledge allegiance to me.' So his tribe pledged allegiance to him, and the hands of two or three men stuck to his hand. He said, 'The stolen booty is among you. It is you who stole it.' So they brought out for him a piece of gold like the head of a cow."They placed it with the rest of the spoils on the open ground, and the fire came forward and consumed it. Spoils of war were not lawful for anyone before us. That is because Allah عز وجل saw our weakness and our inability, so He made them lawful for us."

Ahmad 8238

Sahih

وقال رسول الله ﷺ غزا نبي من الأنبياء فقال لقومه لا يتبعني رجل قد ملك بضع امرأة وهو يريد أن يبني بها ولم يبن ولا أحد قد بنى بنيانا ولما يرفع سقفها ولا أحد قد اشترى غنما أو خلفات وهو ينتظر أولادها فغزا فدنا من القرية حين صلاة العصر أو قريبا من ذلك فقال للشمس أنت مأمورة وأنا مأمور اللهم احبسها علي شيئا فحبست عليه حتى فتح الله عليه فجمعوا ما غنموا فأقبلت النار لتأكله فأبت أن تطعم فقال فيكم غلول فليبايعني من كل قبيلة رجل فبايعوه فلصقت يد رجل بيده فقال فيكم الغلول فلتبايعني قبيلتك فبايعته قبيلته قال فلصق بيد رجلين أو ثلاثة بيده فقال فيكم الغلول أنتم غللتم فأخرجوا له مثل رأس بقرة من ذهب قال فوضعوه في المال وهو بالصعيد فأقبلت النار فأكلته فلم تحل الغنائم لأحد من قبلنا ذلك لأن الله عز وجل رأى ضعفنا وعجزنا فطيبها لنا

أحمد 8238صحيح
Contents
Reference
Commentary
Ayat
Collection
Musnad Ahmad
Book
Abu Hurairah
Numbering
Darussalam 8238
Ahmad 8238