It is narrated from Sayyiduna Imran bin Husayn (may Allah be pleased with him) that a woman from the tribe of Juhaynah came to the Messenger of Allah (peace and blessings be upon him) while she was pregnant from fornication. She said: "O Messenger of Allah, I have committed a sin, so carry out the prescribed punishment (hadd) on me." So the Messenger of Allah (peace and blessings be upon him) called her guardian and said: "Treat her well, and when she has delivered what is in her womb, bring her to me." He did so, and the Messenger of Allah (peace and blessings be upon him) gave the order, and her clothes were tied firmly around her; then he gave the order and she was stoned; then he (peace and blessings be upon him) offered the (funeral) prayer over her. Sayyiduna Umar bin al-Khattab (may Allah be pleased with him) said: "You pray over her when she committed fornication?" He (peace and blessings be upon him) said: "She has repented with such a repentance that, if it were divided among ninety people of Madinah, it would suffice them all. Have you found anything better than that she gave up her life for Allah, the Mighty and Majestic?"
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 15568