Abdullah bin Umar reported,

He heard the Prophet ﷺ, during the dawn prayer, raise his head from bowing and say in the second cycle, "O Allah, our Lord, to You belongs all praise." Then he said, "O Allah, curse so-and-so and so-and-so." So Allah عز وجل revealed, "Not for you, [O Muhammad, but for Allah], is the decision whether He should [cut them down] or forgive them or punish them, for indeed, they are wrongdoers" [Ali Imran 3:128].

Bukhari 7346

Sahih

حدثنا أحمد بن محمد أخبرنا عبد الله أخبرنا معمر عن الزهري عن سالم

عن ابن عمر

أنه سمع النبي ﷺ يقول في صلاة الفجر ورفع رأسه من الركوع قال اللهم ربنا ولك الحمد في الأخيرة ثم قال اللهم العن فلانا وفلانا فأنزل الله عز وجل {ليس لك من الأمر شيء أو يتوب عليهم أو يعذبهم فإنهم ظالمون}

البخاري 7346صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Adhering to the Book and the Sunnah
Chapter
His saying, "There is nothing of the matter for you"
Numbering
Darussalam 7346
Bukhari 7346