Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both) says that on the day of Badr the Messenger of Allah (peace and blessings be upon him) was in his tent, saying: "O Allah, I remind You of Your covenant and Your promise. O Allah, if You so will, You will not be worshipped after today." Sayyiduna Abu Bakr al-Siddiq (may Allah be pleased with him) took hold of his hand and said: O Messenger of Allah, that is enough; you have entreated Allah most persistently. He was wearing a coat of mail at that time, and he came out of the tent reciting these verses: "The assembly will soon be defeated, and they will turn their backs in flight. Rather, the Hour is their appointed time, and the Hour is more calamitous and more bitter." [Surah al-Qamar: 45-46]
Hadith Referenceالسنن الكبرى للبيهقي / كتاب السير / 17931