The Messenger of Allah ﷺ, whenever he wished to invoke against someone or to pray for someone, would make qunut after the bowing. Sometimes, after saying, "Allah hears whoever praises Him, our Lord, to You belongs all praise," he would say, "O Allah, save Walid bin Walid, Salama bin Hisham, Ayyash bin Abu Rabia, and the oppressed believers. O Allah, tighten Your grip upon Mudar and make it years for them like the years of Yusuf."He would say this aloud. In some of his prayers, in the dawn prayer, he would say, "O Allah, curse so-and-so and so-and-so," referring to certain tribes of the Arabs, until Allah revealed, "It is not for you to decide, whether He turns to them in mercy or punishes them, for indeed they are wrongdoers" [Al Imran 3:128].
حدثنا أبو كامل حدثنا إبراهيم يعني ابن سعد حدثنا ابن شهاب عن سعيد بن المسيب وأبي سلمة بن عبد الرحمن
أن رسول الله ﷺ كان إذا أراد أن يدعو على أحد أو يدعو لأحد قنت بعد الركوع فربما قال إذا قال سمع الله لمن حمده ربنا ولك الحمد اللهم أنج الوليد بن الوليد وسلمة بن هشام وعياش بن أبي ربيعة والمستضعفين من المؤمنين اللهم اشدد وطأتك على مضر واجعلها سنين كسني يوسف قال يجهر بذلك ويقول في بعض صلاته في صلاة الفجر اللهم العن فلانا وفلانا حيين من العرب حتى أنزل الله عز وجل {ليس لك من الأمر شيء أو يتوب عليهم أو يعذبهم فإنهم ظالمون}
Its isnad is sahih. Abu Kamil is Muzaffar bin Mudrik Khurasani, the hadith master. Ibrahim is Ibn Saad, with the ayn unvocalized, Ibn Ibrahim bin Abdul-Rahman bin Awf. Here in H and M it appears as Ibrahim meaning Ibn Saeed, with an added ya after the ayn, which is an error. The correct form is established in K, and it is noted in the margin of M that the correct reading is Saad, as in al-Atraf.Bukhari related the hadith, 170-171, from Musa bin Ismail, from Ibrahim bin Saad, with this isnad, in similar wording. Muslim related it, 2:187, by way of Yunus bin Yazid, from Ibn Shihab, with the same, in similar wording. Part of its meaning has already passed in brief at 7259, from the narration of Zuhri, from Saeed, that is, Ibn Musayab. Ibn Kathir cited the fuller narration in his tafsir, 2:258, from Bukhari's narration. See also the hadith preceding this one.A similar account of this story, concerning the reason for the revelation of this verse, has already passed from the hadith of Abdullah bin Umar, by way of the narration of Zuhri, from Salim, from Ibn Umar, at 6349 and 6350.