Imran bin Al-Husain Al-Khuza'i (May Allah be pleased with him) reported:
A woman from the tribe Juhainah came to Messenger of Allah (ﷺ) while she was pregnant from (Zina) adultery and said to him: "O Messenger of Allah! I have committed an offense liable to Hadd (prescribed punishment), so exact the execution of the sentence." Messenger of Allah (ﷺ) called her guardian and said to him, "Treat her kindly. Bring her to me after the delivery of the child." That man complied with the orders. At last the Prophet (ﷺ) commanded to carry out the sentence. Her clothes were secured around her and she was stoned to death. The Prophet (ﷺ) led her funeral prayers. 'Umar submitted: "O Messenger of Allah! She committed Zina and you have performed funeral prayer for her?" He replied, "Verily, she made repentance which would suffice for seventy of the people of Al-Madinah if it is divided among them. Can there be any higher degree of repentance than that she sacrificed her life voluntarily to win the Pleasure of Allah, the Exalted?".[Muslim].
Arabic/English book reference: Book 1, Hadith 22