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].
حدثنا عبد بن حميد أخبرني معاوية بن عمرو عن زائدة عن الأعمش عن أبي صالح
عن النبي ﷺ قال لم تحل الغنائم لأحد سود الرءوس من قبلكم كانت تنزل نار من السماء فتأكلها قال سليمان الأعمش فمن يقول هذا إلا أبو هريرة الآن فلما كان يوم بدر وقعوا في الغنائم قبل أن تحل لهم فأنزل الله تعالى {لولا كتاب من الله سبق لمسكم فيما أخذتم عذاب عظيم}
[Sahih] Nasai also narrated it in Al-Kubra, no. 11209, from the hadith of Amash with the same wording, using an "an" formula, and Ibn Hibban graded it sahih, no. 1668, as did Ibn Jarud, no. 1071. The hadith has corroborating narrations in Bukhari, no. 3124, and Muslim, no. 1747, and others.