Imran bin Husayn reported,

A woman from the tribe of Juhayna came to the Prophet of Allah ﷺ while she was pregnant from adultery and said, "Prophet of Allah, I have committed an offense that requires 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, and the Prophet of Allah ﷺ gave the order, and her clothes were tied securely around her. Then he commanded that she be stoned, and she was stoned. Afterward, he prayed the funeral prayer over her.Umar said to him, "Are you praying 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 people of Madinah, it would be enough for all of them. Have you found any repentance better than her giving up her own life for the sake of Allah the Exalted?"

Muslim 4433

Sahih

حدثني أبو غسان مالك بن عبد الواحد المسمعي حدثنا معاذ يعني ابن هشام حدثني أبي عن يحيى بن أبي كثير حدثني أبو قلابة أن أبا المهلب حدثه

عن عمران بن حصين

أن امرأة من جهينة أتت نبي الله ﷺ وهي حبلى من الزنى فقالت يا نبي الله أصبت حدا فأقمه علي فدعا نبي الله ﷺ وليها فقال أحسن إليها فإذا وضعت فأتني بها ففعل فأمر بها نبي الله ﷺ فشكت عليها ثيابها ثم أمر بها فرجمت ثم صلى عليها فقال له عمر تصلي عليها يا نبي الله وقد زنت فقال لقد تابت توبة لو قسمت بين سبعين من أهل المدينة لوسعتهم وهل وجدت توبة أفضل من أن جادت بنفسها لله تعالى

مسلم 4433صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Legal punishments
Chapter
One who confessed to committing zina
Numbering
Darussalam 4433
Muslim 4433