The Messenger of Allah ﷺ said, "War spoils were not lawful for any black-haired people before you. Fire would descend from the sky and consume them. On the day of Badr, the people hastened to take the spoils, so Allah revealed, 'Had there not been a prior decree from Allah, a great punishment would have afflicted you for what you took. So enjoy what you have gained of spoils, lawful and good, and fear Allah. Indeed, Allah is Forgiving and Merciful' [Anfal 8:68–69]."
قال رسول الله ﷺ: لم تحل الغنائم لقوم سود الرؤوس قبلكم، كانت تنزل النار من السماء، فتأكلها، فلما كان يوم بدر أسرع الناس في الغنائم، فأنزل الله عز وجل: {لولا كتب من الله سبق لمسكم فيما أخذتم عذاب عظيم فكلوا مما غنمتم حللا طيبا واتقوا الله إن الله غفور رحيم}
Tirmidhi (3085) and Ahmad (7433) narrated it, and Ibn Hibban (4806) graded it sahih, all of them through routes from Amash, from Abu Salih, from Abu Hurairah, who related it. Tirmidhi said, "This is a hasan sahih hadith from the hadith of Amash."His statement, "Spoils of war were not made lawful for any dark-headed people before you," means the many nations that came before this nation.