Malik related to me from Ibn Shihab from Ubaydullah ibn Abdullahibn Utba ibn Masud from Abu Hurayra and Zayd ibn Khalid al-Juhani thatthe Messenger of Allah, may Allah bless him and grant him peace, wasasked about a slave-girl who committed fornication and was notmuhsana. He said, "If she commits fornication, then flog her. If shecommits fornication again, then flog her, and if she commitsfornication again, then sell her, if only for a rope."IbnShihab added, "I don't know whether it was three or four times."
USC-MSA web (English) reference: Book 41, Hadith 14
Arabic reference: Book 41, Hadith 1516