فَكُلُوا۟ مِمَّا غَنِمْتُمْ حَلَـٰلًۭا طَيِّبًۭا ۚ وَٱتَّقُوا۟ ٱللَّهَ ۚ إِنَّ ٱللَّهَ غَفُورٌۭ رَّحِيمٌۭ
“It is not fit for a prophet that he should take captives until he has thoroughly subdued the land. You [believers] settled with the fleeting gains of this world, while Allah's aim [for you] is the Hereafter. Allah is Almighty, All-Wise. Had it not been for a 'kitab' from Allah, you would have certainly been disciplined with a tremendous Punishment for whatever [ransom] you have taken. Now enjoy what you have taken, for it is lawful and good. And be mindful of Allah. Surely, Allah is All-Forgiving, Most Merciful.”
Surah al-Anfal was revealed on the plains of Badr regarding the battle and its aftermath.