Khabab bin Arat reported,

The Messenger of Allah ﷺ performed a prayer and prolonged it. The people said, "Messenger of Allah, you prayed a prayer the like of which you have not prayed before."He replied, "Indeed, it was a prayer of hope and fear. I asked Allah in it for three things, and He granted me two and withheld one. I asked Him not to destroy my nation by famine, and He granted it to me. I asked Him not to allow an enemy from outside them to overpower them, and He granted it to me. And I asked Him not to make them taste the violence of one another, but He withheld this from me."

Tirmidhi 2175

Sahih

حدثنا محمد بن بشار حدثنا وهب بن جرير حدثنا أبي قال سمعت النعمان بن راشد يحدث عن الزهري عن عبد الله بن الحارث

عن عبد الله بن خباب بن الأرت عن أبيه قال

صلى رسول الله ﷺ صلاة فأطالها قالوا يا رسول الله صليت صلاة لم تكن تصليها قال أجل إنها صلاة رغبة ورهبة إني سألت الله فيها ثلاثا فأعطاني اثنتين ومنعني واحدة سألته أن لا يهلك أمتي بسنة فأعطانيها وسألته أن لا يسلط عليهم عدوا من غيرهم فأعطانيها وسألته أن لا يذيق بعضهم بأس بعض فمنعنيها

الترمذي 2175صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami Tirmidhi
Book
Tribulations
Chapter
Prophet ﷺ asking three times for his ummah
Numbering
Darussalam 2175
Tirmidhi 2175