Sahih al-Bukhari, Hadith 6839 ⓘ
Narrated Abu Huraira: The Prophet said, "If a lady slave commits illegal sexual intercourse and she is proved guilty of illegal sexual intercourse, then she should be flogged (fifty stripes) but she should not be admonished; and if she commits illegal sexual intercourse again, then she should be flogged again but should not be admonished; and if she commits illegal sexual intercourse for the third time, then she should be sold even for a hair rope."
حَدَّثَنَا عَبْدُ اللَّهِ بْنُ يُوسُفَ، حَدَّثَنَا اللَّيْثُ، عَنْ سَعِيدٍ الْمَقْبُرِيِّ، عَنْ أَبِيهِ، عَنْ أَبِي هُرَيْرَةَ، أَنَّهُ سَمِعَهُ يَقُولُ قَالَ النَّبِيُّ صلى الله عليه وسلم " إِذَا زَنَتِ الأَمَةُ فَتَبَيَّنَ زِنَاهَا فَلْيَجْلِدْهَا وَلاَ يُثَرِّبْ، ثُمَّ إِنْ زَنَتْ فَلْيَجْلِدْهَا وَلاَ يُثَرِّبْ، ثُمَّ إِنْ زَنَتِ الثَّالِثَةَ فَلْيَبِعْهَا وَلَوْ بِحَبْلٍ مِنْ شَعَرٍ " . تَابَعَهُ إِسْمَاعِيلُ بْنُ أُمَيَّةَ عَنْ سَعِيدٍ عَنْ أَبِي هُرَيْرَةَ عَنِ النَّبِيِّ صلى الله عليه وسلم.
also referenced under: Book 86, Hadith 63 (In-Book) & Volume 8, Book 82, Hadith 823 (USC-MSA)