All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
A woman who gives birth to a child is one of the three following cases:
1) One who has not married before and she has not been forced to commit Zina (fornication).
2) One who has married and she has not been forced to commit Zina (adultery).
3) One who has been forced to commit Zina (adultery or fornication).
In fact, each one of the above cases has its specific ruling in front of the Sharee’ah courts. Here are the details:
The first case: such a woman should be given eighty lashes, and then be exiled from her town where she committed Zina for one year.
The second case: such a woman should be stoned till death. A court has no right to cancel the ruling as long as committing Zina is proved, and no one is allowed to intercede to cancel the ruling.
However, before bringing her case in front of the court, we are required to conceal her sin and to remind her of Allah, since whoever conceals a Muslim's misdeeds, Allah will conceal his sin on the Day of Judgement. But, if she ignores such an advice and persists in committing Zina, then we are to bring her case in front of the Sharee’ah courts to put Allah's Command into practice in order to prevent her from spoiling the society and leading it to destruction. Thus, we can stop the spreading of her evil and offence.
The third case: when the woman has been forced to commit Zina, she is exempt from every punishment as the Prophet said: “Allah has forgiven my Ummah for the sins they commit by mistake, out of forgetfulness, or which they are forced to do.” [Ibn Majah]
Allah knows best.