(The adulterer shall not marry save an adulteress or an idolatress…) [24:3].
The commentators of the Qur’an said: “When the Emigrants, some of whom without any means, arrived at Medina, they found there prostitutes who sold pleasure for a price. These prostitutes were, at that time, amongst the most well off people of Medina. Some poor Emigrants coveted their earnings, saying: ‘Why do we not marry them and live with them until Allah, exalted is He, suffices us from them?’ They asked permission from the Messenger of Allah, Allah bless him and give him peace, to marry them, but then this verse was revealed which states that it is forbidden to marry an adulteress in order to exonerate the believers from such acts”.
‘Ikrimah said: “This verse was revealed about some prostitutes who worked openly in Mecca and Medina. There were so many of them. However, nine of them had banners like the banners of al-Baytar by means of which they were known. These nine prostitutes were: Umm Mahzul, the slave girl of al-Sa’ib ibn Abi al-Sa’ib al-Makhzumi, Umm ‘Ulayt, the slave girl of Safwan ibn Umayyah, Hannah the Copt, the slave girl of al-‘As ibn Wa’il, Muznah, the slave girl of Malik ibn ‘Amilah ibn al-Subaq, Jalalah, the slave girl of Suhayl ibn ‘Amr, Umm Suwayd, the slave girl of ‘Amr ibn ‘Uthman al-Makhzumi, Sharifah, the slave girl of Zum‘ah ibn al-Aswad, Farsah, the slave girl of Hisham ibn Rabi‘ah and Fartana, the slave girl of Hilal ibn Anas. The houses of these prostitutes were called, in the pre-Islamic period, mawakhir and those who entered them to buy pleasure were either Muslim adulterers or idolaters, worshippers of idols. Some Muslims wanted to marry prostitutes to gain a living from them, and so Allah, exalted is He, revealed this verse, warned the believers against it and made it forbidden unto them”.
Abu Salih Mansur ibn ‘Abd al-Wahhab al-Bazzar informed us> Abu ‘Amr ibn Hamdan> Ahmad ibn al-Hasan ibn ‘Abd al-Jabbar> Ibrahim ibn ‘Ar‘arah> Mu‘tamir> his father> al-Hadrami> al-Qasim ibn Muhammad> ‘Abd Allah ibn ‘Amr who related that a woman by the name of Umm Mahzul used to fornicate. And her condition for any man who proposed to marry her was that she would provide for him [by continuing to sell herself]. A Muslim man wanted to marry her. He mentioned the matter to the Prophet, Allah bless him and give him peace, and so this verse was revealed (The adulterer shall not marry save an adulteress or an idolatress).
Asbab Al-Nuzul by Al-Wahidi , trans. Mokrane Guezzou