Some companions of the Messenger of Allah ﷺ from the Ansar reported that a man among them fell so gravely ill that he wasted away until he became nothing but skin stretched over bone. A slave girl belonging to one of them came in to visit him, and he became aroused by her and had intercourse with her.When the men of his people came to visit him, he told them what had happened and said, "Seek a ruling for me from the Messenger of Allah ﷺ, for I have had intercourse with a slave girl who came in to me."They mentioned this to the Messenger of Allah ﷺ and said, "We have never seen anyone in such a state of suffering as he is in. If we were to carry him to you, his bones would fall apart. He is nothing but skin on bone."So the Messenger of Allah ﷺ ordered them to take a cluster of one hundred palm twigs and strike him with it a single blow.
حدثنا أحمد بن سعيد الهمداني حدثنا ابن وهب أخبرني يونس عن ابن شهاب قال
أنه أخبره بعض أصحاب رسول الله ﷺ من الأنصار أنه اشتكى رجل منهم حتى أضني فعاد جلدة على عظم فدخلت عليه جارية لبعضهم فهش لها فوقع عليها فلما دخل عليه رجال قومه يعودونه أخبرهم بذلك وقال استفتوا لي رسول الله ﷺ فإني قد وقعت على جارية دخلت علي فذكروا ذلك لرسول الله ﷺ وقالوا ما رأينا بأحد من الناس من الضر مثل الذي هو به لو حملناه إليك لتفسخت عظامه ما هو إلا جلد على عظم فأمر رسول الله ﷺ أن يأخذوا له مائة شمراخ فيضربوه بها ضربة واحدة
[Its chain is sahih] Ibn Jarud narrated it, no. 817, from the hadith of Yunus bin Yazid Ayli, through this same chain.