Punishment of Disbelievers at War with Allah and His Apostle
Bukhari :: Book 8 :: Volume 82 :: Hadith 822
Narrated Abu Huraira and Said bin Khalid:
The verdict of Allah's Apostle was sought about an unmarried slave girl guilty of illegal intercourse. He replied, "If she commits illegal sexual intercourse, then flog her (fifty stripes), and if she commits illegal sexual intercourse (after that for the second time), then flog her (fifty stripes), and if she commits illegal sexual intercourse (for the third time), then flog her (fifty stripes) and sell her for even a hair rope." Ibn Shihab said, "I am not sure whether the Prophet ordered that she be sold after the third or fourth time of committing illegal intercourse."