Abu Hurairah reported,

The Prophet ﷺ said, "War spoils were not made lawful for any of the dark-headed people before you. Fire would descend from the sky and consume them."Sulayman Amash remarked, "Who would relate this now except Abu Hurairah?"So when the day of Badr came, they took from the spoils before they had been made lawful for them, and Allah Almighty revealed, "Had it not been for a decree from Allah that preceded, you would have been touched for what you took by a great punishment" [Anfal 8:68].

Tirmidhi 3085

Sahih

حدثنا عبد بن حميد أخبرني معاوية بن عمرو عن زائدة عن الأعمش عن أبي صالح

عن أبي هريرة

عن النبي ﷺ قال لم تحل الغنائم لأحد سود الرءوس من قبلكم كانت تنزل نار من السماء فتأكلها قال سليمان الأعمش فمن يقول هذا إلا أبو هريرة الآن فلما كان يوم بدر وقعوا في الغنائم قبل أن تحل لهم فأنزل الله تعالى {لولا كتاب من الله سبق لمسكم فيما أخذتم عذاب عظيم}

الترمذي 3085صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami Tirmidhi
Book
Tafsir of the Quran
Chapter
From Surah Anfal
Numbering
Darussalam 3085
Tirmidhi 3085