Sahih al-Bukhari, Hadith 2232 ⓘ
Narrated Zaid bin Khalid and Abu Huraira: that Allah's Messenger was asked about an unmarried slave-girl who committed illegal sexual intercourse. They heard him saying, "Flog her, and if she commits illegal sexual intercourse after that, flog her again, and on the third (or the fourth) offense, sell her."
حَدَّثَنِي زُهَيْرُ بْنُ حَرْبٍ، حَدَّثَنَا يَعْقُوبُ، حَدَّثَنَا أَبِي، عَنْ صَالِحٍ، قَالَ حَدَّثَ ابْنُ شِهَابٍ، أَنَّ عُبَيْدَ اللَّهِ، أَخْبَرَهُ أَنَّ زَيْدَ بْنَ خَالِدٍ وَأَبَا هُرَيْرَةَ رضى الله عنهما أَخْبَرَاهُ أَنَّهُمَا، سَمِعَا رَسُولَ اللَّهِ صلى الله عليه وسلم يُسْأَلُ عَنِ الأَمَةِ تَزْنِي وَلَمْ تُحْصَنْ قَالَ " اجْلِدُوهَا، ثُمَّ إِنْ زَنَتْ فَاجْلِدُوهَا، ثُمَّ بِيعُوهَا بَعْدَ الثَّالِثَةِ أَوِ الرَّابِعَةِ " .
also referenced under: Book 34, Hadith 179 (In-Book) & Volume 3, Book 34, Hadith 435 (USC-MSA)