لَّوْلَا كِتَٰبٌ مِّنَ ٱللَّهِ سَبَقَ لَمَسَّكُمْ فِيمَآ أَخَذْتُمْ عَذَابٌ عَظِيمٌ
Commentary:
In the previous verse it was said that Muslims should not be hasty in taking captives from among the enemy. The verse under comment hints that kindness should be shown to prisoners and that they should be treated with mercy. The verse says that it is only through the assistance of God, which He had ordained for Muslims, that they have gained an easy victory and obtained much booty, and that if it had not been for the help which God had promised them beforehand, they would not have obtained the booty without being severely handled by the enemy and suffering great loss at his hands. The words, a decree from Allah which had gone before, obviously refer to the Word of God which had already conveyed the promise of help to the Holy Prophet (see 8:6 above). The words "great distress" thus signify distress caused by the enemy and not affliction from God. The verse purports to say that when by the help of God the Muslims have gained so easy a victory, they should feel grateful for it and should show kindness to the prisoners who have fallen into their hands.
The words refer to the Divine promise of help (8:8-10).
Ransoming of captives was already in vogue. What is emphasized here is that prisoners could only be taken in regular fighting in the course of war.