Masruq reported,

I came to Ibn Masud, and he said, "The Quraysh were slow in accepting Islam, so the Prophet ﷺ supplicated against them. They were struck by a year of drought until they perished in it and ate carrion and bones."Abu Sufyan came to him and said, "Muhammad, you came commanding the upholding of kinship ties, but your people are perishing. So pray to Allah."Then he recited, "So watch for the Day when the sky will bring a visible smoke" [Dukhan 44:10].Then they returned to their disbelief, and that is the meaning of His statement, "The Day We will strike with the greatest assault, indeed, We will take retribution" [Dukhan 44:16], referring to the day of Badr.Abu Abdullah said, and Asbat added from Mansur, "So the Messenger of Allah ﷺ supplicated, and they were given rain, which poured down on them for seven days. The people then complained of the abundance of rain."He said, "O Allah, around us and not upon us." So the cloud parted from above his head, and the people around them were given rain.

Bukhari 1020

Sahih

حدثنا محمد بن كثير عن سفيان حدثنا منصور والأعمش عن أبي الضحى

عن مسروق قال

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

البخاري 1020صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Istisqa
Chapter
When the polytheists seek intercession from the Muslims during drought
Numbering
Darussalam 1020
Bukhari 1020