This is an old story, a historical event, a parable which is repeated with pride by all the Islamic Scholars as a proof of virtues of women and the kindness of the Messenger of God.
A young woman approached Prophet Mohammed and confessed to Him that she had committed adultery (Faahisha), and wished to be purified. Perhaps she was given hope by the Holy Quran, (Surah 4:15) “If any of your women are guilty of adultery, take the evidence of four witnesses from amongst you against them; and if they testify, confine them to houses until death does claim them.”
It is not on record if the Prophet asked her if she thought that, according to Surah 24:8-9, she might get remission in punishment by invoking the wrath of God on herself. Nor did the Prophet ask her who her partner was in crime. To the Messenger of God, these small things did not matter. He sent her away without a comment. Perhaps he wanted time to consider whether the view of God as dictated to Him in the Quran or his own decision should prevail.
The woman came the next day and confessed that she was pregnant from the act. Come back to me after you deliver the baby, said the Prophet. It is not on record whether he said this explicitly or not, but he didn’t care who made the girl pregnant, whether it happened by mutual consent, or she was raped –these things obviously was not important.
The woman dutifully reported back when she had had the baby. She was a pious Muslim and had obviously read the Quran. She was sure that repentance leads to remission in punishment, of that she was sure.
“Come back to me after you wean the baby”, commanded the Prophet.
Ever a true believer, she went back to the Prophet when weaning was through. She had the baby in her hand. The Prophet, in his mercy, entrusted the baby to a Muslim.
Then He got a ditch dug up deep enough to cover her up to her chest and ordered that she be stoned, which the believers did with great enthusiasm as believers of all faiths are wont to. How enthusiastic the woman felt is not on record.
Qazi Khalid bin Walid, one of Prophet’s favourite disciples, raised a huge rock above his head and then lobbed it hard on her head. The victim’s blood splattered on the face of the pious Qazi, for which crime he cursed her.
The ever merciful Prophet did not rebuke him, but advised him to be gentle, for she had repented. Perhaps the Qazi lobbed the next stone ever so gently.
When the ritual was done and all her blood was spilled, the merciful Prophet got her buried, presumably satisfied that his own view, not of the Quran, prevailed.