Marthad bin Abu Marthad al-Ghanawi used to smuggle prisoners out of Mecca. There was a prostitute in Mecca called Anaq, and she had been his lover.He said, "I came to the Prophet ﷺ and asked, 'Messenger of Allah, may I marry Anaq?'"He remained silent toward me, and then the verse was revealed, "And the adulteress, none marries her except an adulterer or a polytheist" [Nur 24:3].He then called me, recited it to me, and said, "Do not marry her."
حدثنا إبراهيم بن محمد التيمي حدثنا يحيى عن عبيد الله بن الأخنس
أن مرثد بن أبي مرثد الغنوي كان يحمل الأسارى بمكة وكان بمكة بغي يقال لها عناق وكانت صديقته قال جئت إلى النبي ﷺ فقلت يا رسول الله أنكح عناق قال فسكت عني فنزلت {والزانية لا ينكحها إلا زان أو مشرك} فدعاني فقرأها علي وقال لا تنكحها
[Its isnad is hasan] Nasai narrated it in the Book of Marriage, chapter on marrying an adulteress, no. 3230, from Ibrahim bin Muhammad, with this wording, and Tirmidhi graded it hasan, no. 3177. Hakim graded it sahih (2/166), and Dhahabi agreed with him.