Al-Sha'bi said that Sharahah al-Hamdaniyyah was brought to Sayyiduna Ali (may Allah be pleased with him), and he said to her: Woe to you! Perhaps a man had intercourse with you while you were asleep? She said: No. He said: Perhaps he forced you? She said: No. He said: Perhaps your husband, who is among this enemy of ours, came to you, and you do not want to point him out? He was prompting her in the hope that she would say yes. Then he gave orders concerning her and she was confined. When she had delivered what was in her womb, he brought her out on Thursday and gave her a hundred lashes, and on Friday he had a pit dug for her in al-Rahabah. The people surrounded her and took up stones, but he said: This is not how stoning is done; this way you would hit one another. Line up like the rows of prayer, row behind row. Then he said: O people, any woman who is brought while pregnant, or who confesses, the imam is the first to stone her, then the people; and any woman, or adulterous man, who is brought and against whom four people testify to adultery, the witnesses are the first to stone, then the imam, then the people. Then he stoned her, then he ordered them, and one row after another stoned her. Then he said: Do with her what you do with your dead.
The Shaykh said that flogging a married person has been abrogated; now for such a person there is only stoning.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الحدود / 16963