Sahih Muslim 2890 a
'Amir b. Sa'd reported on the authority of his father that one day Allah's Messenger (ﷺ) came from a high, land. He passed by the mosque of Banu Mu'awiya, went in and observed two rak'ahs there and we also observed prayer along with him and he made a long supplication to his Lord. He then came to us and said:
I asked my Lord three things and He has granted me two but has withheld one. I begged my Lord that my Ummah should not be destroyed because of famine and He granted me this. And I begged my Lord that my Ummah should not be destroyed by drowning (by deluge) and He granted me this. And I begged my Lord that there should be no bloodshed among the people of my Ummah, but He did not grant it.
حَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ، حَدَّثَنَا عَبْدُ اللَّهِ بْنُ نُمَيْرٍ، ح وَحَدَّثَنَا ابْنُ نُمَيْرٍ، -
 وَاللَّفْظُ لَهُ - حَدَّثَنَا أَبِي، حَدَّثَنَا عُثْمَانُ بْنُ حَكِيمٍ، أَخْبَرَنِي عَامِرُ بْنُ سَعْدٍ، عَنْ أَبِيهِ، أَنَّ رَسُولَ
 اللَّهِ صلى الله عليه وسلم أَقْبَلَ ذَاتَ يَوْمٍ مِنَ الْعَالِيَةِ حَتَّى إِذَا مَرَّ بِمَسْجِدِ بَنِي مُعَاوِيَةَ دَخَلَ
 فَرَكَعَ فِيهِ رَكْعَتَيْنِ وَصَلَّيْنَا مَعَهُ وَدَعَا رَبَّهُ طَوِيلاً ثُمَّ انْصَرَفَ إِلَيْنَا فَقَالَ صلى الله عليه
 وسلم ‏
"‏ سَأَلْتُ رَبِّي ثَلاَثًا فَأَعْطَانِي ثِنْتَيْنِ وَمَنَعَنِي وَاحِدَةً سَأَلْتُ رَبِّي أَنْ لاَ يُهْلِكَ أُمَّتِي
 بِالسَّنَةِ فَأَعْطَانِيهَا وَسَأَلْتُهُ أَنْ لاَ يُهْلِكَ أُمَّتِي بِالْغَرَقِ فَأَعْطَانِيهَا وَسَأَلْتُهُ أَنْ لاَ يَجْعَلَ
 بَأْسَهُمْ بَيْنَهُمْ فَمَنَعَنِيهَا ‏"‏ ‏.‏