As for those of your women who are guilty of immoral conduct, call upon four from amongst you to bear witness against them. And if four men do bear witness, confine those women to their houses until either death takes them away or Allah opens some way for them. 15 And as for the two of you who are guilty thereof, punish them both. And if they repent and improve, then let them be. Lo! Allah is ever relenting, Merciful. 16 (And remember that) Allah's acceptance of repentance is only for those who commit evil out of ignorance and then soon repent. It is towards such persons that Allah turns graciously. Allah is All-Knowing, All-Wise. 17 But repentance is not [accepted] of those who [continue to] do evil deeds up until, when death comes to one of them, he says, "Indeed, I have repented now," or of those who die while they are disbelievers. For them We have prepared a painful punishment. 18 Believers, it is not lawful for you to inherit women against their will, nor should you detain them wrongfully, so that you may take away a part of what you have given them, unless they are guilty of something clearly outrageous. Live with them in accordance with what is fair and kind; if you dislike them, it may be that you dislike something which God might make a source of abundant good. 19 And if you wish to change one wife for another and you have given her heaps of treasure, do not take back anything from it; will you take it back by slander and open sin? 20 How can you take it back when you have reached one another (sexually) and they have taken from you a strong covenant! 21 And marry not women whom your fathers married,- except what is past: It was shameful and odious,- an abominable custom indeed. 22