Ibn ‘Abbās (may Allah be pleased with him) reported: On the day of (the battle of) Badr, the Messenger of Allah (may Allah's peace and blessings be upon him) looked at the polytheists, who were one thousand (fighters), while his Companions were three hundred and nineteen. The Prophet (may Allah's peace and blessings be upon him) turned towards the Qiblah, stretched his hands up, and started calling upon his Lord: "O Allah, fulfill for me what You have promised to me. O Allah, accomplish what You have promised to me. O Allah, if this small band of Muslims is destroyed, You will not be worshiped on earth." He continued his supplication to his Lord while raising his hands and facing the Qiblah until his mantle slipped down from his shoulders. So Abu Bakr came to him, picked up his mantle, and put it back on his shoulders. Then he embraced him from behind and said: "O Prophet, you have sufficiently prayed to your Lord, and He will fulfill for you what He has promised you." So Allah, the Exalted, revealed: {When you appealed to your Lord for help, He responded to your call (saying): I will help you with one thousand angels coming in succession} [Sūrat al-Anfāl: 9]. So Allah supported him with angels." Abu Zumayl reported that Ibn ‘Abbās told him: "On that day, a Muslim was chasing a disbeliever who was running in front of him, he heard the sound of a whip from above, and the voice of a rider, saying: 'Go ahead, Hayzūm.' He glanced at the polytheist, who had (then) fallen down on his back. When he looked at him, there was a scar on his nose, and his face was torn as if it had been lashed with a whip, and it all turned purple. The Ansāri (man from the Ansār came to the Messenger of Allah (may Allah's peace and blessings be upon him) and related this (incident) to him. He said: 'You have told the truth. This was help from the third heaven.' On that day (the day of the battle of Badr), the Muslims killed seventy disbelievers and captured seventy as captives. The Messenger of Allah (may Allah's peace and blessings be upon him) said to Abu Bakr and ‘Umar (may Allah be pleased with both of them): 'What is your opinion regarding these captives?' Abu Bakr said: 'They are our kith and kin. I think you charge them a ransom (in return for releasing them), which (the ransom) will be a source of strength to us against the disbelievers. Perhaps, Allah will guide them to Islam.' Then the Messenger of Allah (may Allah's peace and blessings be upon him) said: 'What is your opinion, O Ibn al-Khattāb?' He said: 'No, by Allah, O Messenger of Allah, I do not agree with the opinion of Abu Bakr. I am of the opinion that you should hand them over to us so that we cut off their heads. Hand over ‘Aqīl to ‘Ali to cut off his head, and hand over such-and-such relative to me to cut off his head. These are the leaders of the disbelief and its veterans.' ‘Umar noted: 'The Messenger of Allah (may Allah's peace and blessings be upon him) favored the opinion of Abu Bakr and did not favor what I had said. The next day, when I came to the Messenger of Allah (may Allah's peace and blessings be upon him) I found that both he and Abu Bakr were sitting and crying. I said: ‘O Messenger of Allah, why are you and your companion crying? Tell me the reason. For I will cry, or I will at least pretend to cry in sympathy with you.’ The Messenger of Allah (may Allah's peace and blessings be upon him) said: ‘I cry for what has been offered to your companions of taking the ransom (from the prisoners). I was shown the punishment to which they will be subjected. It was brought to me as close as this tree.’ Then Allah, the Exalted, revealed: {It is not befitting for a Prophet that he should take prisoners until the force of the disbelievers has been crushed...} [Sūrat al-Anfāl: 67] {so eat of what you have gained of the spoils of war, (it is) lawful and pure} [Sūrat al-Anfāl: 69]. So Allah made war spoils lawful for them."
Authentic hadith - Narrated by Muslim