The Messenger of Allah ﷺ once prayed a prayer and prolonged it. The companions said, "Messenger of Allah, you prayed a prayer unlike any you have prayed before."He replied, "Yes, it was a prayer of hope and fear. In it I asked Allah for three things. He granted me two and withheld one. I asked Him not to destroy my Ummah by famine, and He granted me that. I asked Him not to give power over them to an enemy from outside themselves, and He granted me that. And I asked Him not to let them taste the violence of one another, but He withheld that from me."
صلى رسول الله ﷺ صلاة فأطالها فقالوا: يا رسول الله! صليت صلاة لم تكن تصليها. قال: أجل، إنها صلاة رغبة ورهبة، إني سألت الله فيها ثلاثا، فأعطاني اثنتين، ومنعني واحدة، سألته أن لا يهلك أمتي بسنة فأعطانيها، وسألته أن لا يسلط عليهم عدوا من غيرهم، فأعطانيها، وسألته أن لا يذيق بعضهم بأس بعض فمنعنيها.
Reported by Tirmidhi (2175) and Nasai (1638), both from the hadith of Zuhri, who said, Ubaydullah bin Abdullah bin Harith bin Nawfal informed me, from Abdullah bin Khabab bin Arat, from his father, and he related the hadith. The wording given is that of Tirmidhi. Nasai's wording states that he watched the Messenger of Allah ﷺ the whole night until it was near Fajr. When the Messenger of Allah finished his prayer, Khabab came to him and said, "O Messenger of Allah, may my father and mother be sacrificed for you, tonight you prayed a prayer the like of which I have not seen you pray before." The Messenger of Allah ﷺ said, "Yes." He then related the hadith, in which it states, "I asked my Lord, Mighty and Majestic, not to destroy us as He destroyed the nations before us, and He granted it to me. I asked my Lord, Mighty and Majestic, not to let an enemy other than ourselves prevail over us, and He granted it to me. And I asked Him not to make us divided into factions, but He withheld that from me."It was also reported by Imam Ahmad (21053) and Tabarani (3621) through the route of Zuhri, and Ahmad's wording matches that of Nasai. Tirmidhi said, "Hasan sahih gharib." I say, it is indeed so, and its chain of transmission is sahih.His words, "a prayer of longing and dread," mean a prayer in which he made supplication, longing for it to be answered and dreading that it would be rejected.