أَخْبَرَنَا قُتَيْبَةُ بْنُ سَعِيدٍ، عَنْ مَالِكٍ، عَنْ شَرِيكِ بْنِ عَبْدِ اللَّهِ بْنِ أَبِي نَمِرٍ، عَنْ أَنَسِ بْنِ مَالِكٍ، قَالَ جَاءَ رَجُلٌ إِلَى رَسُولِ اللَّهِ صلى الله عليه وسلم فَقَالَ يَا رَسُولَ اللَّهِ هَلَكَتِ الْمَوَاشِي وَانْقَطَعَتِ السُّبُلُ فَادْعُ اللَّهَ عَزَّ وَجَلَّ ‏.‏ فَدَعَا رَسُولُ اللَّهِ صلى الله عليه وسلم فَمُطِرْنَا مِنَ الْجُمُعَةِ إِلَى الْجُمُعَةِ فَجَاءَ رَجُلٌ إِلَى رَسُولِ اللَّهِ صلى الله عليه وسلم فَقَالَ يَا رَسُولَ اللَّهِ تَهَدَّمَتِ الْبُيُوتُ وَانْقَطَعَتِ السُّبُلُ وَهَلَكَتِ الْمَوَاشِي ‏.‏ فَقَالَ ‏"‏ اللَّهُمَّ عَلَى رُءُوسِ الْجِبَالِ وَالآكَامِ وَبُطُونِ الأَوْدِيَةِ وَمَنَابِتِ الشَّجَرِ ‏"‏ ‏.‏ فَانْجَابَتْ عَنِ الْمَدِينَةِ انْجِيَابَ الثَّوْبِ ‏.‏

It was narrated that Anas bin Malik said: "A man came to the Messenger of Allah (PBUH) and said: 'O Messenger of Allah, the livestock have died and the routes have been cut off; pray to Allah (SWT), the Mighty and Sublime.' So the Messenger of Allah (PBUH) prayed to Allah (SWT) and it rained from that Friday until the next. Then a man came to the Messenger of Allah (PBUH) and said: 'The houses have been destroyed, the routes have been cut off and the livestock have died.' He said: 'O Allah, on the tops of the mountains and hills, in the bottom of the valleys and where the trees grow.' So (the rain) was lifted from Al-Madinah like a garment being removed." Translation Not Available

Book reference: Sunan An Nisai Book 17 Hadith 1504
Web reference: Sunan An Nisai Volume 2 Book 17 Hadith 1505