Abdullah bin Abbas reported,

The Messenger of Allah ﷺ said, while he was in a tent on the day of Badr, "O Allah, I implore You by Your covenant and Your promise. O Allah, if You will, You shall not be worshipped after this day."Abu Bakr took him by the hand and said, "That is enough, Messenger of Allah. You have pleaded with your Lord insistently."He came out, leaping into his coat of mail, saying, "The multitude shall be routed, and they shall turn their backs in flight" [Qamar 54:45].Chapter on His statement, "Nay, the Hour is their appointed time, and the Hour shall be more grievous and more bitter" [Qamar 54:46], meaning, in bitterness.

Bukhari 4875

Sahih

حدثنا محمد بن عبد الله بن حوشب حدثنا عبد الوهاب حدثنا خالد عن عكرمة عن ابن عباس ح و حدثني محمد حدثنا عفان بن مسلم عن وهيب حدثنا خالد عن عكرمة

عن ابن عباس رضي الله عنهما

أن رسول الله ﷺ قال وهو في قبة يوم بدر اللهم إني أنشدك عهدك ووعدك اللهم إن تشأ لا تعبد بعد اليوم فأخذ أبو بكر بيده فقال حسبك يا رسول الله ألححت على ربك وهو يثب في الدرع فخرج وهو يقول {سيهزم الجمع ويولون الدبر} باب قوله {بل الساعة موعدهم والساعة أدهى وأمر} يعني من المرارة

البخاري 4875صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Tafsir
Chapter
His saying, "The assembly will be defeated and they will turn their backs"
Numbering
Darussalam 4875
Bukhari 4875