(Had it not been for an ordinance of Allah which had gone before) had it not been for Allah's decree that spoils of war were lawful for the community of Muhammad (pbuh); it is also said that this means: had it not been that Allah decreed felicity for the people of Badr, (an awful) a severe (doom had come upon you on account of what ye took) would have befallen you because of the ransoms you took.