ʿAli (ؓ )addressed us and said: O people, carry out the hadd punishments on your slaves, both those who have been married and those who have not been married, for a slave woman of the Messenger of Allah ﷺ committed zina and the Messenger of Allah ﷺ ordered me to carry out the hadd Punishment on her. I went to her and found that she was still bleeding following childbirth, and I was afraid that if I flogged her she would die So I went to the Messenger of Allah ﷺ and told him about that, and he said: “You have done well.” (Using translation from Aḥmad 1341)
يَا أَيُّهَا النَّاسُ أَقِيمُوا الْحُدُودَ عَلَى أَرِقَّائِكُمْ مَنْ أُحْصِنَ مِنْهُنَّ وَمَنْ لَمْ يُحْصِنْ فَإِنَّ أَمَةً لِرَسُولِ اللَّهِ ﷺ زَنَتْ فَأَمَرَنِي رَسُولُ اللَّهِ ﷺ أَنْ أَجْلِدَهَا فَأَتَيْتُهَا فَإِذَا هِيَ حَدِيثُ عَهْدٍ بِنِفَاسٍ فَخَشِيتُ إِنْ أَنَا جَلَدْتُهَا أَنْ أَقْتُلَهَا وَأَنْ تَمُوتَ فَأَتَيْتُ رَسُولَ اللَّهِ ﷺ فَذَكَرْتُ ذَلِكَ لَهُ فَقَالَ «أَحْسَنْتَ»