A woman from Juhayna came to the Prophet of Allah ﷺ while pregnant from adultery and said, "Prophet of Allah, I have committed an offense deserving the prescribed punishment, so carry it out on me."The Prophet of Allah ﷺ called her guardian and said, "Treat her well, and when she gives birth bring her to me."He did so. Then the Prophet ﷺ gave instructions concerning her, and her garments were tied securely around her. He then ordered that she be stoned, and afterwards he prayed over her.Umar said to him, "You pray over her, Prophet of Allah, when she has committed adultery?"He replied, "She has made such a sincere repentance that if it were divided among seventy of the people of Madinah it would be enough for them all. Have you ever found a repentance better than her giving up her own life for Allah the Exalted?"
أن امرأة من جهينة أتت نبي الله ﷺ وهي حبلى من الزنى. فقالت: يا نبي الله! أصبت حدا فأقمه علي. فدعا نبي الله ﷺ وليها فقال: أحسن إليها. فإذا وضعت فائتني بها ففعل فأمر بها نبي ﷺ فشكت عليها ثيابها. ثم أمر بها فرجمت. ثم صلى عليها. فقال له عمر: تصلي عليها؟ يا نبي الله! وقد زنت. فقال: لقد تابت توبة لو قسمت بين سبعين من أهل المدينة لوسعتهم. وهل وجدت توبة أفضل من أن جادت بنفسها الله تعالى.
Muslim narrated it in "The Book of Legal Punishments" (1696) from Abu Ghassan Malik bin Abdul-Wahid Mismai, who said, Muaz, meaning Ibn Hisham, told us, my father told me, from Yahya bin Abu Kathir, Abu Qilaba told me, that Abu Muhallab told him, from Imran bin Husayn, and he related it.