There was a man called Marthad bin Abu Marthad who used to smuggle prisoners from Mecca and bring them to Medina. There was a prostitute in Mecca named Anaq who was his friend. He had promised to bring out one of the prisoners of Mecca.He said, "I came along until I reached the shade of one of the walls of Mecca on a moonlit night. Then Anaq came and saw the dark shape of my shadow beside the wall. When she reached me, she recognized me and said, 'Marthad?'I said, 'Yes, Marthad.'She said, 'Welcome! Come and spend the night with us.'I said, 'Anaq, Allah has forbidden fornication.'She cried out, 'People of the tents, this man is the one taking away your prisoners!'Eight men chased after me. I took the path of Khandama and reached a cave, or a cavern, and entered it. They came and stood right above me and urinated, their urine falling onto my head, but Allah blinded them to me. Then they went back, and I returned to my companion and carried him. He was a heavy man. I went on until I reached the idhkhir grass, where I undid his shackles. I would carry him and he would tire me out, until I reached Medina.I came to the Messenger of Allah ﷺ and said, 'Messenger of Allah, may I marry Anaq?'The Messenger of Allah ﷺ remained silent and gave me no reply, until the verse was revealed, "The fornicator marries none but a fornicatress or a polytheist woman, and the fornicatress, none marries her except a fornicator or a polytheist man. That has been forbidden to the believers" [Nur 24:3].The Messenger of Allah ﷺ then said, 'Marthad, "The fornicator marries none but a fornicatress or a polytheist woman, and the fornicatress, none marries her except a fornicator or a polytheist man" [Nur 24:3], so do not marry her.'"
حدثنا عبد بن حميد حدثنا روح بن عبادة عن عبيد الله بن الأخنس أخبرني
كان رجل يقال له مرثد بن أبي مرثد وكان رجلا يحمل الأسرى من مكة حتى يأتي بهم المدينة قال وكانت امرأة بغي بمكة يقال لها عناق وكانت صديقة له وإنه كان وعد رجلا من أسارى مكة يحمله قال فجئت حتى انتهيت إلى ظل حائط من حوائط مكة في ليلة مقمرة قال فجاءت عناق فأبصرت سواد ظلي بجنب الحائط فلما انتهت إلي عرفته فقالت مرثد فقلت مرثد فقالت مرحبا وأهلا هلم فبت عندنا الليلة قال قلت يا عناق حرم الله الزنا قالت يا أهل الخيام هذا الرجل يحمل أسراكم قال فتبعني ثمانية وسلكت الخندمة فانتهيت إلى كهف أو غار فدخلت فجاءوا حتى قاموا على رأسي فبالوا فظل بولهم على رأسي وأعماهم الله عني قال ثم رجعوا ورجعت إلى صاحبي فحملته وكان رجلا ثقيلا حتى انتهيت إلى الإذخر ففككت عنه كبله فجعلت أحمله ويعييني حتى قدمت المدينة فأتيت رسول الله ﷺ فقلت يا رسول الله أنكح عناقا فأمسك رسول الله ﷺ فلم يرد علي شيئا حتى نزلت {الزاني لا ينكح إلا زانية أو مشركة والزانية لا ينكحها إلا زان أو مشرك وحرم ذلك على المؤمنين} فقال رسول الله ﷺ يا مرثد {الزاني لا ينكح إلا زانية أو مشركة والزانية لا ينكحها إلا زان أو مشرك} فلا تنكحها
Its isnad is hasan. Reference: Abu Dawud narrated it in the Book of Marriage, chapter on the saying of Allah Almighty, "The fornicator does not marry except a fornicator," hadith no. 2051, and Nasai, 6/66, hadith no. 3230, from the hadith of Ubaydullah bin Akhnas with the same wording. Hakim graded it sahih, 2/166, and Dhahabi agreed with him.