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."
Sahih al-Bukhari Book 34, Hadith 179