عَنْ أَبِي هُرَيْرَةَ رَضِيَ اللَّهُ عَنْهُ قَالَ قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ حَدٌّ يُعْمَلُ وَفِي لَفْظٍ يُقَامُ فِي الْأَرْضِ خَيْرٌ لِأَهْلِ الْأَرْضِ مِنْ أَنْ يُمْطَرُوا ثَلَاثِينَ وَفِي لَفْظٍ أَوْ أَرْبَعِينَ صَبَاحًا
Narrated by Sayyiduna Abu Hurairah (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: Implementing one prescribed punishment on earth is better for the people of the earth than thirty days of rain. In another narration, forty days of rain is mentioned.