Sunan Ibn Majah, Book 20, Hadith 2634 (In-Book) ⓘ
It was narrated from Ibn `Umar that the Messenger of Allah said: “Carrying out one of the legal punishments prescribed by Allah (SWT) is better than if it were to rain for forty nights in the land of Allah (SWT), Glorified is He.”
حَدَّثَنَا هِشَامُ بْنُ عَمَّارٍ، حَدَّثَنَا الْوَلِيدُ بْنُ مُسْلِمٍ، حَدَّثَنَا سَعِيدُ بْنُ سِنَانٍ، عَنْ أَبِي الزَّاهِرِيَّةِ، عَنْ أَبِي شَجَرَةَ، كَثِيرِ بْنِ مُرَّةَ عَنِ ابِنْ عُمَرَ، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَالَ " إِقَامَةُ حَدٍّ مِنْ حُدُودِ اللَّهِ خَيْرٌ مِنْ مَطَرِ أَرْبَعِينَ لَيْلَةً فِي بِلاَدِ اللَّهِ عَزَّ وَجَلَّ " .
also referenced under: Hadith 2537 (Reference) & Volume 3, Book 20, Hadith 2537 (DarusSalam)