He said:
The Messenger of Allah, peace and blessings be upon him, consulted Abu Bakr, who advised, “They are your kinsfolk; release them.” He then consulted ʿUmar, who said, “Kill them.” The Messenger of Allah, peace and blessings be upon him, therefore accepted ransom for them. Thereupon Allah revealed: “It is not fitting for a Prophet to have captives until he has thoroughly subdued the land …” (Q 8:67). Al-Ḥākim remarked: “This ḥadith has a sound chain of transmission, although the two Shaykhs did not record it.”
Al-Tirmidhī, al-Nasāʾī, and Ibn Ḥibbān in his Ṣaḥīḥ also narrated—through Sufyān al-Thawrī, from Hishām ibn Ḥassān, from Muḥammad ibn Sīrīn, from ʿUbaydah—that ʿAlī said: “Gabriel came to the Prophet, peace and blessings be upon him, and said, ‘Give your Companions a choice regarding the captives: if they wish, they may accept ransom, and if they wish, they may kill them—yet if they choose ransom, then next year the same number of them will be killed.’ They said, ‘We choose the ransom, even if some of us are killed.’” This report is exceedingly rare (gharīb jiddan); some have transmitted it as mursal from ʿUbaydah—and Allah knows best.
Ibn Isḥāq, citing Ibn Abī Najīḥ from ʿAṭāʾ, from Ibn ʿAbbās, explained the verse, “Had it not been for a decree from Allah that had already preceded, a severe punishment would have afflicted you for what you took” (Q 8:68): “Had it not been My practice not to punish those who disobey Me until I have first forewarned them, a severe chastisement would have touched you for what you took.” A similar report comes from Ibn Abī Najīḥ on the authority of Mujāhid, and it is the view preferred by Ibn Isḥāq and others.
Al-Aʿmash said, “It had been decreed that no one who witnessed Badr would be punished,” and the same is related from Saʿd ibn Abī Waqqāṣ, Saʿīd ibn Jubayr, and ʿAṭāʾ ibn Abī Rabāḥ.
Mujāhid and al-Thawrī said that the phrase “Had it not been for a decree from Allah that had already preceded” refers to forgiveness that had been granted to them.
Al-Wālibī relates from Ibn ʿAbbās: “It was written in the first Mother of the Book that war-booty and the ransom of captives are lawful for you.” Hence Allah’s subsequent words: “So consume what you have taken as booty—lawful and wholesome” (Q 8:69).