(12) باب إِذَا اسْتَشْفَعُوا إِلَى الإِمَامِ لِيَسْتَسْقِيَ لَهُمْ لَمْ يَرُدُّهُمْ
Narrated Anas bin Malik:
A man came to Allah's Messenger (ﷺ) and said, "O Allah's Messenger (ﷺ)! Livestock are destroyed and the roads are cut off; so please invoke Allah." So Allah's Messenger (ﷺ) prayed for rain and it rained from that Friday till the next Friday. Then a man came to the Prophet (p.b.u.h) and said, "O Allah's Messenger (ﷺ)! The houses have collapsed, roads are cut off and the livestock are destroyed." So Allah's Messenger (ﷺ) said, "O Allah ! (Let it rain) on the tops of the mountains, on the plateaus, in the valleys and over the places where trees grow." So the clouds cleared away from Medina as clothes are taken off.
Reference: Sahih al-Bukhari 1019
In-book reference: Book 15, Hadith 14
USC-MSA web (English) reference(deprecated numbering scheme): Vol. 2, Book 17, Hadith 132