‘Ali reported God's Messenger as saying that Gabriel came down to him and said to him, “Give them (i.e. your companions) their choice regarding the prisoners at Badr whether they should be killed or ransomed on condition that a like number of them should be killed the following year.” They replied, “We shall accept ransom and have some of us killed.”
Tirmidhi transmitted it, saying this is a gharib tradition.
Ibn Mas'ud told that when God’s Messenger intended to kill ‘Uqba b. Abu Mu'ait he asked who would look after the children, and he replied that hell would.
I was among the captives of Quraiza who were brought before the Prophet. The Companions examined us, and those who had begun to grow hair were killed, but those who had not were not killed. They uncovered my private parts and when they found that the hair had not begun to grow they put me among the captives.
She told that when God’s Messenger took prisoner the people at Badr he killed ‘Uqba b. Aba Mu'ait and an-Nadr b. al-Harith, but showed favour to Abu ‘Azza al-Jumahi.