The Messenger of Allah ﷺ prayed a prayer in which he beautified the standing, the humility, the bowing, and the prostration. He said, "This was a prayer of hope and fear. I asked Allah in it for three things. He granted me two and withheld one. I asked Him not to send upon my nation an enemy from outside them who would annihilate them, and He granted me that. I asked Him not to send upon them a famine that would kill them with hunger, and He granted me that. And I asked Him not to make their violence among themselves, but He refused me that."
صلى رسول الله ﷺ صلاة، فأحسن فيها القيام والخشوع والركوع والسجود، قال: إنها صلاة رغب ورهب، سألت الله فيها ثلاثا، فأعطاني اثنتين، وزوى عني واحدة، سألته أن لا يبعث على أمتي عدوا من غيرهم فيجتاحهم فأعطانيه، وسألته أن لا يبعث عليهم سنة تقتلهم جوعا فأعطانيه، وسألته أن لا يجعل بأسهم بينهم فردها علي.
Ahmad (22108, 22125) narrated it through multiple routes from Abdul-Malik bin Umayr, from Abdul-Rahman bin Abu Layla, from Muaz bin Jabal, who related it. Abdul-Rahman bin Abu Layla did not hear directly from Muaz bin Jabal, but there is another route that strengthens it.That is what Ibn Majah (3951) and Ahmad (22082) narrated, and Ibn Khuzayma (1218) graded it sahih, all of them through multiple routes from Amash, from Raja Ansari, from Abdullah bin Shaddad bin Had, from Muaz bin Jabal, who related it. Except that this version contains, "And I asked Him not to destroy them by drowning, and He granted me that," and it does not mention the year that would kill them through hunger.Raja Ansari had no one narrate from him except Amash, and no one has confirmed him as reliable. Ibn Hajar said in Taqrib, "Acceptable," meaning when corroborated, and he has indeed been corroborated in the core of the hadith.