Hadithcore
Jami` at-Tirmidhi, 1441
sahih· Darussalam

Narrated Abu 'Abdur-Rahman As-Sulami:

"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.'"

حَدَّثَنَا الْحَسَنُ بْنُ عَلِيٍّ الْخَلاَّلُ، حَدَّثَنَا أَبُو دَاوُدَ الطَّيَالِسِيُّ، حَدَّثَنَا زَائِدَةُ بْنُ قُدَامَةَ، عَنِ السُّدِّيِّ، عَنْ سَعْدِ بْنِ عُبَيْدَةَ، عَنْ أَبِي عَبْدِ الرَّحْمَنِ السُّلَمِيِّ، قَالَ خَطَبَ عَلِيٌّ فَقَالَ يَا أَيُّهَا النَّاسُ أَقِيمُوا الْحُدُودَ عَلَى أَرِقَّائِكُمْ مَنْ أَحْصَنَ مِنْهُمْ وَمَنْ لَمْ يُحْصِنْ وَإِنَّ أَمَةً لِرَسُولِ اللَّهِ صلى الله عليه وسلم زَنَتْ فَأَمَرَنِي أَنْ أَجْلِدَهَا فَإِذَا هِيَ حَدِيثَةُ عَهْدٍ بِنِفَاسٍ فَخَشِيتُ إِنْ أَنَا جَلَدْتُهَا أَنْ أَقْتُلَهَا - أَوْ قَالَ تَمُوتَ - فَأَتَيْتُ رَسُولَ اللَّهِ صلى الله عليه وسلم فَذَكَرْتُ ذَلِكَ لَهُ فَقَالَ ‏

‏ أَحْسَنْتَ ‏

‏ ‏.‏ قَالَ أَبُو عِيسَى هَذَا حَدِيثٌ حَسَنٌ صَحِيحٌ ‏.‏ وَالسُّدِّيُّ اسْمُهُ إِسْمَاعِيلُ بْنُ عَبْدِ الرَّحْمَنِ وَهُوَ مِنَ التَّابِعِينَ قَدْ سَمِعَ مِنْ أَنَسِ بْنِ مَالِكٍ وَرَأَى حُسَيْنَ بْنَ عَلِيِّ بْنِ أَبِي طَالِبٍ رضى الله عنه ‏.‏

References2 variants
In-Book Reference
Book 17, Hadith 24
English Reference
Vol. 3, Book 15, Hadith 1441