Malik related to me from Zayd ibn Aslam that a man confessed to fornication in the time of the Messenger of Allah ﷺ. The Messenger of Allah ﷺ called for a whip, and he was brought a broken whip. He said, "Above this," and he was brought a new whip whose knots had not been cut yet. He said, "Below this," and he was brought a whip which had been used and made flexible. The Messenger of Allah ﷺ gave the order and he was flogged. Then he said, "People! The time has come for you to observe the limits of Allah. Whoever has had any of these ugly things befall him should cover them up with the veil of Allah. Whoever reveals to us his wrong action, we perform what is in the Book of Allah against him."
أَنَّ رَجُلاً اعْتَرَفَ عَلَى نَفْسِهِ بِالزِّنَا عَلَى عَهْدِ رَسُولِ اللَّهِ ﷺ فَدَعَا لَهُ رَسُولُ اللَّهِ ﷺ بِسَوْطٍ فَأُتِيَ بِسَوْطٍ مَكْسُورٍ فَقَالَ فَوْقَ هَذَا فَأُتِيَ بِسَوْطٍ جَدِيدٍ لَمْ تُقْطَعْ ثَمَرَتُهُ فَقَالَ دُونَ هَذَا فَأُتِيَ بِسَوْطٍ قَدْ رُكِبَ بِهِ وَلاَنَ فَأَمَرَ بِهِ رَسُولُ اللَّهِ ﷺ فَجُلِدَ ثُمَّ قَالَ أَيُّهَا النَّاسُ قَدْ آنَ لَكُمْ أَنْ تَنْتَهُوا عَنْ حُدُودِ اللَّهِ مَنْ أَصَابَ مِنْ هَذِهِ الْقَاذُورَاتِ شَيْئًا فَلْيَسْتَتِرْ بِسِتْرِ اللَّهِ فَإِنَّهُ مَنْ يُبْدِي لَنَا صَفْحَتَهُ نُقِمْ عَلَيْهِ كِتَابَ اللَّهِ