Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both) narrates: The Prophet (peace and blessings be upon him) called out to the captives of Badr; the ransom of each of them was four thousand. Uqbah bin Abi Mu'ayt was killed before the ransom was taken: Sayyiduna Ali bin Abi Talib (may Allah be pleased with him) rose and went to him and killed him while he was bound. He said (before dying): "O Muhammad, who will look after the children?" The Prophet (peace and blessings be upon him) said: "The Fire."
Al-Tabarani recorded it in al-Mu'jam al-Kabir and al-Mu'jam al-Awsat, and its narrators are the narrators of the Sahih.