On the day of Uhud, when the polytheists had withdrawn, the Messenger of Allah ﷺ said, "Line up straight so that I may praise my Lord ."So they formed rows behind him, and he said, "O Allah, all praise belongs to You. O Allah, none can withhold what You extend, none can bring near what You set far, none can set far what You bring near, none can give what You withhold, and none can withhold what You give. O Allah, extend over us Your blessings, Your mercy, Your favor, and Your provision. O Allah, I ask You for lasting bliss that neither changes nor passes away. O Allah, I ask You for sustenance on the day of want and security on the day of war. O Allah, I seek refuge in You from the evil of what You have given us and the evil of what You have withheld from us. O Allah, make faith beloved to us and adorn it in our hearts, and make disbelief, wickedness, and disobedience hateful to us, and make us among the rightly guided. O Allah, let us die as Muslims and live as Muslims, and join us with the righteous, neither disgraced nor seduced from faith. O Allah, fight the disbelievers who turn people away from Your path and deny Your messengers, and bring upon them Your punishment and torment. O Allah, fight the disbelievers who were given the Scripture, God of truth."
لما كان يوم أحد، وانكفأ المشركون، قال رسول الله ﷺ: استووا حتى أثني على ربي عز وجل فصاروا خلفه صفوفا فقال: اللهم لك الحمد كله، اللهم لا قابض لما بسطت ولا مقرب لما باعدت، ولا مباعد لما قربت، ولا معطي لما منعت، ولا مانع لما أعطيت. اللهم ابسط علينا من بركاتك ورحمتك وفضلك ورزقك، اللهم إني أسألك النعيم المقيم الذي لا يحول ولا يزول، اللهم إني أسألك النعيم يوم العيلة، والأمن يوم الحرب، اللهم عائذا بك من سوء ما أعطيتنا، وشر ما منعت منا اللهم حبب إلينا الإيمان وزينه في قلوبنا، وكره إلينا الكفروالفسوق والعصيان، واجعلنا من الراشدين، اللهم توفنا مسلمين وأحينا مسلمين، وألحقنا بالصالحين، غير خزايا ولا مفتونين، اللهم قاتل الكفرة الذين يصدون عن سبيلك ويكذبون رسلك، واجعل عليهم رجزك وعذابك، اللهم قاتل الكفرة الذين أوتوا الكتاب، إله الحق.
Ahmad (15492), Bukhari in Adab al-Mufrad (699), Bazzar in Kashf Astar (1800), and Hakim (1/506–507) all narrated it through various chains from Abdul-Wahid bin Ayman, from Ubayd bin Rifa Zurafi, from his father, and he mentioned it.Its chain of transmission is sahih, and the discussion of it is given in detail in the book on the biography of the Prophet ﷺ.