"Ali gave a Khutbah, and said: 'O people, establish the penalties upon your slaves, those married from them and those unmarried. A slave girl of the Prophet ﷺ committed illegal sexual intercourse so he ordered me to whip her. I went to her and she was just experiencing her post-natal bleeding, so I feared that if I were to whip her I would kill her' - or he said: 'She would die' - 'so I went to the Messenger of Allah ﷺ and I told that to him. So he said: 'You did well.'" (Using translation from Tirmidhī 1441)
يَا أَيُّهَا النَّاسُ أَقِيمُوا الْحُدُودَ عَلَى أَرِقَّائِكُمْ مَنْ أُحْصِنَ مِنْهُمْ وَمَنْ لَمْ يُحْصِنْ فَإِنَّ أَمَةً لِرَسُولِ اللهِ ﷺ زَنَتْ فَأَمَرَنِي أَنْ أَجْلِدَهَا فَإِذَا هِيَ حَدِيثَةُ عَهْدٍ بِالنِّفَاسِ فَخَشِيتُ إِنْ أَنَا جَلَدْتُهَا أَنْ تَمُوتَ فَأَتَيْتُ النَّبِيَّ ﷺ فَأَخْبَرْتُهُ قَالَ أَحْسَنْتَ لَفْظُ حَدِيثِ يُونُسَ وَفِي رِوَايَةِ الْمُقَدَّمِيِّ فَخَشِيتُ إِنْ أَنَا جَلَدْتُهَا أَنْ أَقْتُلَهَا فَذَكَرْتُ ذَلِكَ لِلنَّبِيِّ ﷺ فَقَالَ أَحْسَنْتَ