The Messenger of Allah ﷺ said, "Take this from me, take this from me. Allah has now made a way for them. The unmarried with the unmarried, one hundred lashes and banishment for a year. The married with the married, one hundred lashes and stoning."
قال رسول الله ﷺ: خذوا عني، خذوا عني، قد جعل الله لهن سبيلا: البكر بالبكر جلد مائة ونفي سنة، والثيب بالثيب جلد مائة والرجم.
Muslim narrated it in the Book of Hudud (12:1690), from Yahya bin Yahya Tamimi, who said, Hushaym informed us, from Mansur, from Hasan, from Hittan bin Abdullah Raqashi, from Ubada bin Samit, who said, then he mentioned it.His statement, "Allah has made a way for them," refers to the words of the Almighty, "Then confine them to the houses until death takes them or Allah makes for them a way" [Nisa 4:15].The scholars differed over whether a married person (who commits adultery) is to be flogged along with being stoned, or not. Some held that he is to be flogged one hundred times and then stoned, citing the hadith of Ubada as their evidence. This has been reported from Ali bin Abu Talib, Abdullah bin Masud, and Ubayy bin Kaab, and Ishaq and Dawud held this view.The majority held that there is no flogging for the married person along with stoning, and this is reported from Abu Bakr, Umar, and other companions. This is the view held by the generality of the jurists. They said that flogging was abrogated for anyone upon whom stoning became obligatory, because the Prophet ﷺ stoned Maiz, the woman of Ghamid, and the two Jews, and did not flog any one of them. He said to Unays Aslami, "Go in the morning to the woman, and if she confesses, then stone her." This hadith represents the later of the two matters, because its narrator, Abu Hurairah, embraced Islam at a later time, so it serves to abrogate what preceded it regarding combining flogging with stoning.