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. (Using translation from Abū Dāʾūd 4459)
عَنِ النَّبِيِّ ﷺ فِي الرَّجُلِ أَتَى جَارِيَةَ امْرَأَتِهِ قَالَ «إِنْ كَانَتْ حَلَّلَتْهَا لَهُ جُلِدَ مِائَةً وَإِنْ لَمْ تَكُنْ أَحَلَّتْهَا لَهُ رَجَمْتُهُ»