It is narrated from Sayyiduna Imran bin Husayn (may Allah be pleased with him) that a woman from the tribe of Juhaynah committed fornication, then came to the Messenger of Allah (peace and blessings be upon him) after she had become pregnant from fornication. She said: "O Messenger of Allah, I have committed an offence that carries a prescribed punishment (hadd), so carry it out 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 held 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 (may Allah be pleased with him) said to him (peace and blessings be upon him): "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 seventy people of Madinah, it would suffice them all. And have you found anything better than that she gave up her life for Allah, the Mighty and Majestic?"
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 15569