Umar bin Khattab reported,

On the day of Badr, the Messenger of Allah ﷺ looked at the idolaters, who numbered a thousand, while his companions were three hundred and nineteen men. The Prophet of Allah ﷺ turned to face the qibla, stretched out his hands, and began calling upon his Lord, "Allah, fulfill for me what You promised me. Allah, grant me what You promised me. Allah, if You destroy this band of the people of Islam, You will not be worshipped on earth."He kept calling upon his Lord, hands outstretched, facing the qibla, until his cloak slipped from his shoulders. Abu Bakr came to him, picked up the cloak, placed it back on his shoulders, then held him from behind and said, "Prophet of Allah, you have implored your Lord enough. He will surely fulfill for you what He promised you."Then Allah عز وجل revealed, "When you sought help from your Lord and He answered you, 'I am reinforcing you with a thousand angels, rank upon rank.'" [Anfal 8:9] So Allah reinforced him with the angels. The hadith continues.

Azami 7877

Sahih

عن عمر بن الخطاب قال

لما كان يوم بدر نظر رسول الله ﷺ إلى المشركين، وهم ألف، وأصحابه ثلاثمائة وتسعة عشررجلا، فاستقبل نبي الله ﷺ القبلة ثم مد يديه، فجعل يهتف بربه: اللهم أنجز لي ما وعدتني، اللهم آت ما وعدتني، اللهم إن تهلك هذه العصابة من أهل الإسلام لا تعبد في الأرض، فما زال يهتف بربه مادا يديه مستقبل القبلة حتى سقط رداؤه عن منكبيه، فأتاه أبو بكر، فأخذ رداءه فألقاه على منكبيه، ثم التزمه من ورائه، وقال: يا نبي الله كفاك مناشدتك ربك، فإنه سينجز لك ما وعدك فأنزل الله عز وجل: {إذ تستغيثون ربكم فاستجاب لكم أني ممدكم بألف من المليكة مردفين} [سورة الأنفال: ٩] فأمده الله بالملائكة. الحديث.

الأعظمي 7877صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Jihad
Chapter
Rulings on jihad and its etiquette
Section
Supplication for victory when meeting the enemy
Numbering
Jami al-Kamil 7877 (2nd edition)
Azami 7877