It was narrated from Anas bin Malik that he said:
While we were in the masjid on Friday and the Messenger of Allah (ﷺ) was addressing the people, a man stood up and said: 'O Messenger of Allah, the routes have been cut off, our wealth has been destroyed and prices have gone up. Pray to Allah (SWT) to give us rain.' So the Messenger of Allah (ﷺ) raised his hands in level with his face and said: 'O Allah, give us rain.' By Allah (SWT), the Messenger of Allah (ﷺ) had not come down from the minbar before it started to pour with rain, and it rained from that day until the following Friday. Then a man stood up- I do not know if he was the same man who had asked the Messenger of Allah (ﷺ) to pray for rain for us or not- and said: 'O Messenger of Allah, the routes have been cut off, and our wealth has been destroyed because there is too much water. Pray to Allah (SWT ) to stop the rain for us.' The Messenger of Allah (ﷺ) said: 'O Allah, around us and not on us, rather on the mountains and places where trees grow.' By Allah, hardly had the Messenger of Allah (ﷺ) spoken these words than the clouds split apart (and vanished) until we could not see anything of them.'