(87) باب دُعَاءِ النَّبِيِّ صلى الله عليه وسلم لأُمَّتِهِ وَبُكَائِهِ شَفَقَةً عَلَيْهِمْ
'Abdullah b. Amr b. al-'As reported:
Verily the Messenger of Allah (ﷺ) recited the words of Allah, the Great and Glorious, that Ibrahim uttered. My Lord! lo! they have led many of mankind astray:" But whoso followeth me, he verily is of me" (al-Qur'an, xiv. 35) and Jesus (peace be upon him) said:" If thou punisheth them, lo! they are Thy slaves, and if Thou forgiveth them-verily Thou art the Mighty, the Wise" (al-Qur'an, v 117). Then he raised his hands and said: O Lord, my Ummah, my Ummah, and wept; so Allah the High and the Exalted said: O Gabriel, go to Muhammad (though your Lord knows it fully well) and ask him: What makes thee weep? So Gabriel (peace be upon him) came to him and asked him, and the Messenger of Allah (ﷺ) informed him what he had said (though Allah knew it fully well). Upon this Allah said: O Gabriel, go to Muhammad and say: Verily We will please thee with regard to your Ummah and would not displease thee.
Reference: Sahih Muslim 202
In-book reference: Book 1, Hadith 407
USC-MSA web (English) reference(deprecated numbering scheme): Book 1, Hadith 397