Abu Abdul-Rahman reported,

Ali delivered a sermon and said, "People, carry out the prescribed punishment on your slaves, both those who are married and those who are not. A slave-woman belonging to the Messenger of Allah ﷺ committed fornication, and he ordered me to flog her. When I went to her, I found she had recently given birth, and I feared that if I flogged her I might kill her. I mentioned this to the Prophet ﷺ, and he said, 'You did well.'"

Muslim 4450

Sahih

حدثنا محمد بن أبي بكر المقدمي حدثنا سليمان أبو داود حدثنا زائدة عن السدي عن سعد بن عبيدة

عن أبي عبد الرحمن قال

خطب علي فقال يا أيها الناس أقيموا على أرقائكم الحد من أحصن منهم ومن لم يحصن فإن أمة لرسول الله ﷺ زنت فأمرني أن أجلدها فإذا هي حديث عهد بنفاس فخشيت إن أنا جلدتها أن أقتلها فذكرت ذلك للنبي ﷺ فقال أحسنت

مسلم 4450صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Legal punishments
Chapter
Delaying the hadd punishment for the woman in postpartum bleeding
Numbering
Darussalam 4450
Muslim 4450