Sunan Abi Dawud, Book 40, Hadith 109 (Abu Dawud 4461)

Narrated An-Nu'man ibn Bashir:

The Prophet (ﷺ) said: about a man who had (unlawful) intercourse with his wife's slave girl: If she made her lawful for him, he will be flogged one hundred lashes; if she did not make her lawful for him, I shall stone him.