لَّوْلَا كِتَـٰبٌ مِّنَ ٱللَّهِ سَبَقَ لَمَسَّكُمْ فِيمَآ أَخَذْتُمْ عَذَابٌ عَظِيمٌ
Asad Quran Translation
Had it not been for a decree from God that had already gone forth, there would indeed have befallen you a tremendous chastisement on account of all [the captives] that you took.73
This is apparently a reference to the captives taken by the Muslims at Badr, and the discussions among the Prophet's followers as to what should be done with them. 'Umar ibn al-Khattab was of the opinion that they should be killed in revenge for their past misdeeds, and in particular for their persecution of the Muslims before the latters' exodus to Medina; Abu Bakr, on the other hand, pleaded for forgiveness and a release of the prisoners against ransom, supporting his plea with the argument that such an act of mercy might induce some of them to realize the truth of Islam. The Prophet adopted the course of action advocated by Abu Bakr, and released the captives. (The relevant Traditions are quoted by most of the commentators, and especially - with full indication of the sources - by Tabari and Ibn Kathir.) The reference in the above verse to the "tremendous chastisement" that might have befallen the Muslims "but for a decree (kitab) from God that had already gone forth" - i.e., a course of action fore-ordained in God's knowledge - makes it clear that the killing of the captives would have been an awesome sin.
Malik Quran Translation
Had there not been a previous sanction from Allah to take ransom, you should have been sternly punished for what you have taken.
Yusuf Ali Quran Translation
Had it not been for a previous ordainment from Allah a severe penalty would have reached you for the (ransom) that ye took. 1235
Though any motive of worldly gain, which may have been in the minds of some among the victorious Muslim army, is condemned as worthy of a severe penalty, what actually happened is ascribed to the Plan of Allah, which was preordained. Among the prisoners taken were the Prophet's uncle 'Abbas and Hadhrat 'Ali's brother, Aqil, who afterwards became Muslims. 'Abbas was an ancestor of the founder of the celebrated 'Abbasi Dynasty which played such a notable part in Islamic history. In his case the promise made in verse 70 was amply fulfilled. In the case of all prisoners, if there was any good in their hearts, their very fight against Islam and their capture led to their being blessed with Islam. Thus does Allah's Plan work in a marvellous way, and evolve good out of seeming evil.
Mustafa Khattab Quran Translation
Had it not been for a prior decree from Allah,1
you would have certainly been disciplined with a tremendous punishment for whatever ˹ransom˺ you have taken.
The decree that ransoming captives will be allowed.
Piktal Quran Translation
Had it not been for an ordinance of Allah which had gone before, an awful doom had come upon you on account of what ye took.
Lawla kitabun mina Allahi sabaqa lamassakum feema akhathtum AAathabun AAatheemun