وَبِهِ عَنِ
ابْنِ عَبَّاسٍ : مَا كَانَ لِنَبِيٍّ أَنْ يَكُونَ لَهُ أَسْرَى - فَقَرَأَ حَتَّى إِذَا بَلَغَ - عَذَابٌ عَظِيمٌ ، يَعْنِي غَنَائِمَ بَدْرٍ قَبْلَ أَنْ يُحِلَّهَا لَهُمْ يَقُولُ : لَوْلَا أَنِّي لَا أُعَذِّبُ مَنْ عَصَانِي حَتَّى أَتَقَدَّمَ إِلَيْهِ لَمَسَّكُمْ فِيمَا أَخَذْتُمْ عَذَابٌ عَظِيمٌ .
It is narrated from Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both) that he recited the verse "It is not fitting for a Prophet that he should have captives" until he reached "a great punishment", and said that this refers to the spoils of Badr, before Allah Almighty made them lawful for them. Allah Almighty says: "Were it not that I do not punish the one who disobeys without first warning him, a great punishment would have seized you for what you took."
Related hadith on this topic