The Ways of Ascent - 70:30
Except for their wives, that is, those to whom their oaths/contracts entitle them. They will not be condemned.
About the man and woman who commit adultery:
The Women/4:25
Those of you who cannot afford to marry free women, let them marry those to whom your believing oaths/agreements entitle you. Allah is the Best Knower of your faith. You are equal to each other. Marry them with the permission of their owners and pay them their mahr accordingly. Let them live chaste lives, not committing adultery and not taking secret friends. If they commit adultery after they have gained their freedom through marriage, they should be punished with half the punishment given to free women. This is for those of you who fear sin. It is better for you if you are patient. Allah is Forgiving, Merciful.
The Light/24:1
This is a Surah which We have sent down and published as a law, and We have placed in it clear verses so that you may take admonition.
The Light/24:2
Strike each of the man and woman who commits adultery with a hundred strokes of the gavel. If you believe in Allah and the Last Day, your pity for them should not prevent you from applying Allah´s law. Let a group of believers witness their punishment.
The Light/24:3
An adulterous man will eventually marry an adulterous or idolatrous woman, and an adulterous woman will eventually marry an adulterous or idolatrous man. This is forbidden for believers.
The Light/24:4
Those who accuse married women and cannot bring four witnesses, strike them with eighty strokes of the sword, and do not accept their testimony for ever. They are the ones who have gone astray.
The Light/24:5
But for those who repent after that and reform themselves, Allah is Forgiving, Merciful.
The Light/24:6
The testimony of a man who accuses his wife and has no witnesses other than himself may be valid if he swears by Allah four times that he speaks the truth.
The Light/24:7
On the fifth oath, he swears that Allah´s curse be upon him if he is a liar.
The Light/24:8
If she swears to Allah four times and testifies that her husband is a liar, then she will escape the punishment.
The Light/24:9
The fifth time she swears by Allah that Allah´s wrath be upon her if her husband is truthful.
The Women/4:15
Bring four witnesses from among you against those of your women who commit fornication. If they testify, keep them in houses until they die or until Allah makes a way for them.
The Women/4:16
Punish the couple among you who commit adultery. If they repent and reform, forsake them. Allah is All-accepting, All-merciful.