The Messenger of Allah ﷺ said, "War spoils were never made lawful for any people with black heads before you. Fire would descend from the sky and consume them. On the day of Badr, the people rushed to seize the spoils, so Allah revealed, 'Had there not been a prior decree from Allah, a tremendous punishment would have struck you for what you took. So consume what you have gained as lawful and good'" [Anfal 8:68–69].
حدثنا أبو معاوية حدثنا الأعمش عن أبي صالح
قال رسول الله ﷺ لم تحل الغنائم لقوم سود الرءوس قبلكم كانت تنزل النار من السماء فتأكلها كان يوم بدر أسرع الناس في الغنائم فأنزل الله عز وجل {لولا كتاب من الله سبق لمسكم فيما أخذتم عذاب عظيم فكلوا مما غنمتم حلالا طيبا}
Its chain of transmission is sahih. Tabari related it in his tafsir 10:32, with two chains, through Abu Muawiya, from Amash, in similar wording. Bayhaqi likewise related it in Sunan al-Kubra 6:290, through Muhadir, and through Abu Muawiya, both of them from Amash, in similar wording. Tirmidhi related it 4:112-113, through Zaida bin Qudama, from Amash, in similar wording, and said, this is a hasan sahih hadith. Suyuti mentioned it in Durr Manthur 3:203, and also attributed it to Ibn Abu Shayba in Musannaf, Nasai, Ibn Munzir, Ibn Abu Hatim, Abu Shaykh, and Ibn Mardawayh. Ibn Kathir referred to it in his tafsir 4:97, without a chain going back to Amash and without any documentation.As for his statement, "it was the day of Badr," in kh it reads "because" instead of "it was," which is an error, and we have corrected it based on k and m.