ٱلزَّانِى لَا يَنكِحُ إِلَّا زَانِيَةً أَوۡ مُشۡرِكَةً وَٱلزَّانِيَةُ لَا يَنكِحُهَآ إِلَّا زَانٍ أَوۡ مُشۡرِكٌ ۚ وَحُرِّمَ ذَٰلِكَ عَلَى ٱلۡمُؤۡمِنِينَ
Let no man guilty of adultery or fornication marry and but a woman similarly guilty, or an Unbeliever: nor let any but such a man or an Unbeliever marry such a woman: to the Believers such a thing is forbidden.<br/>
The fornicator shall not marry anyone but a fornicatress or an idolatress, and the fornicatress shall be married by none except a fornicator or an idolator, in other words, what is suitable for each of the two [for the purposes of marriage] is the above-mentioned; and that, namely, marrying of fornicators, is forbidden to believers, who are better [than those]. This was revealed when the poor among the Emigrants resolved to marry the wealthy whores of the idolaters, so that they [the women] would provide for them. Thus it is said that the prohibition applies specifically to them; but it is also said to apply in general; but it was abrogated by God's words: Marry off the spouseless among you [Q. 24:32].