The Messenger of Allah ﷺ, while inside a small tent on the day of Badr, said, "O Allah, I call upon 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 earnestly with your Lord."Then he leapt up while putting on his coat of mail and went out reciting, "The hosts will be routed and will turn their backs in flight" [Qamar 54:45].
حدثنا عفان حدثنا وهيب حدثنا خالد عن عكرمة
أن رسول الله ﷺ قال وهو في قبة يوم بدر اللهم إني أنشدك عهدك ووعدك اللهم إن شئت لم تعبد بعد اليوم فأخذ أبو بكر بيده فقال حسبك يا رسول الله فقد ألححت على ربك وهو يثب في الدرع فخرج وهو يقول {سيهزم الجمع ويولون الدبر}
Its isnad is sahih. Ibn Kathir cited it in the Tafsir 8:139, from Sahih Bukhari, via Affan, from Wahib, then said, "Bukhari and Nasai likewise narrated it in more than one place, from the hadith of Khalid, that is Ibn Mihran Hadhdha, with this same wording." This hadith is not mentioned in the Musnad other than this one time, and something similar in meaning came from Umar bin Khattab, in Awsat by Tabarani, as in Majma al-Zawaid 6:78.