The Messenger of Allah ﷺ consulted Abu Bakr about the captives.Abu Bakr said, "They are your own people and your kin, so let them go free."Then he consulted Umar, who said, "Kill them."So the Messenger of Allah ﷺ accepted ransom for them, and Allah revealed, "It is not for a prophet to hold captives until he has thoroughly subdued the land" down to His words, "So eat of what you have taken as spoils, lawful and good" [Anfal 8:67–69].Afterward the Prophet ﷺ met Umar and said, "A calamity nearly struck us for having gone against your view."
استشار رسول الله ﷺ في الأسارى أبا بكر، فقال: قومك وعشيرتك، فخل سبيلهم. فاستشار عمر، فقال: اقتلهم. قال: ففداهم رسول الله ﷺ فأنزل الله عز وجل {ما كان لنبي أن يكون له أسرى حتى يثخن في الأرض} إلى قوله {فكلوا مما غنمتم حللا طيبا} قال: فلقي النبي ﷺ عمر، قال: كاد أن يصيبنا في خلافك بلاء.
Hakim narrated it (2/329) from Abu Abbas Muhammad bin Ahmad Mahbubi, who said, "Saeed bin Masud told us, Ubaydullah bin Musa told us, Israil told us, from Ibrahim bin Muhajir, from Mujahid, from Ibn Umar," and he related it. Hakim said, "The isnad is sahih."I say, Ibrahim bin Muhajir Bajali, although he is among the narrators relied upon by Muslim, is disputed. Abu Hatim said, "He is not strong." Ibn Hibban said, "He makes many errors." Others accepted him. Because of this, the isnad becomes hasan.Ibn Jareer narrated in his tafsir, from Ibn Abbas, concerning the words of Allah Almighty, "It is not for a prophet to take captives until he has thoroughly subdued the land" [Anfal 8:67], that he said, "That was the day of Badr, when the Muslims were few. When they grew numerous and their power became strong, Allah revealed after this, concerning the captives, "So either free them graciously or ransom them" [Surah Muhammad 47:4]. Thus Allah gave the Prophet ﷺ and the believers the choice regarding the captives, if they wished, they could kill them, and if they wished, they could enslave them."