Language:
كتاب الاستسقاء
15  
Invoking Allah for Rain (Istisqaa)
(13)
Chapter: If Al-Mushrikun intercede the Muslim to invoke Allah for rain during drought
(13)
باب إِذَا اسْتَشْفَعَ الْمُشْرِكُونَ بِالْمُسْلِمِينَ عِنْدَ الْقَحْطِ
Sahih al-Bukhari 1020

Narrated Masruq:

One day I went to Ibn Mas`ud who said, "When Quraish delayed in embracing Islam, the Prophet (ﷺ) I invoked Allah to curse them, so they were afflicted with a (famine) year because of which many of them died and they ate the carcasses and Abu Sufyan came to the Prophet (ﷺ) and said, 'O Muhammad! You came to order people to keep good relation with kith and kin and your nation is being destroyed, so invoke Allah I ? So the Prophet (ﷺ) I recited the Holy verses of Sirat-Ad-Dukhan: 'Then watch you For the day that The sky will Bring forth a kind Of smoke Plainly visible.' (44.10) When the famine was taken off, the people renegade once again as nonbelievers. The statement of Allah, (in Sura "Ad- Dukhan"-44) refers to that: 'On the day when We shall seize You with a mighty grasp.' (44.16) And that was what happened on the day of the battle of Badr." Asbath added on the authority of Mansur, "Allah's Messenger (ﷺ) prayed for them and it rained heavily for seven days. So the people complained of the excessive rain. The Prophet (ﷺ) said, 'O Allah! (Let it rain) around us and not on us.' So the clouds dispersed over his head and it rained over the surroundings."

حَدَّثَنَا مُحَمَّدُ بْنُ كَثِيرٍ، عَنْ سُفْيَانَ، حَدَّثَنَا مَنْصُورٌ، وَالأَعْمَشُ، عَنْ أَبِي الضُّحَى، عَنْ مَسْرُوقٍ، قَالَ أَتَيْتُ ابْنَ مَسْعُودٍ فَقَالَ إِنَّ قُرَيْشًا أَبْطَئُوا عَنِ الإِسْلاَمِ،، فَدَعَا عَلَيْهِمُ النَّبِيُّ صلى الله عليه وسلم فَأَخَذَتْهُمْ سَنَةٌ حَتَّى هَلَكُوا فِيهَا وَأَكَلُوا الْمَيْتَةَ وَالْعِظَامَ، فَجَاءَهُ أَبُو سُفْيَانَ فَقَالَ يَا مُحَمَّدُ، جِئْتَ تَأْمُرُ بِصِلَةِ الرَّحِمِ، وَإِنَّ قَوْمَكَ هَلَكُوا، فَادْعُ اللَّهَ‏.‏ فَقَرَأَ ‏{‏فَارْتَقِبْ يَوْمَ تَأْتِي السَّمَاءُ بِدُخَانٍ مُبِينٍ‏}‏ ثُمَّ عَادُوا إِلَى كُفْرِهِمْ فَذَلِكَ قَوْلُهُ تَعَالَى ‏{‏يَوْمَ نَبْطِشُ الْبَطْشَةَ الْكُبْرَى‏}‏ يَوْمَ بَدْرٍ‏.‏ قَالَ وَزَادَ أَسْبَاطٌ عَنْ مَنْصُورٍ فَدَعَا رَسُولُ اللَّهِ صلى الله عليه وسلم، فَسُقُوا الْغَيْثَ، فَأَطْبَقَتْ عَلَيْهِمْ سَبْعًا، وَشَكَا النَّاسُ كَثْرَةَ الْمَطَرِ فَقَالَ ‏"‏ اللَّهُمَّ حَوَالَيْنَا وَلاَ عَلَيْنَا ‏"‏‏.‏ فَانْحَدَرَتِ السَّحَابَةُ عَنْ رَأْسِهِ، فَسُقُوا النَّاسُ حَوْلَهُمْ‏.‏
Reference : Sahih al-Bukhari 1020
In-book reference : Book 15, Hadith 15
USC-MSA web (English) reference : Vol. 2, Book 17, Hadith 133
  (deprecated numbering scheme)