Narrated 'Amr bin Shu'aib: from his father, from his grandfather, who said There was a man named Marthad bin Abi Marthad, and he was a man who would carry captives from Makkah to Al-Madinah. He said: And there was a prostitute woman in Makkah called 'Anaq, who was a friend of his. He had promised a man from the captives of Makkah that he would transport him, and he said: 'So I came until I reached one of the walls of Makkah on a moon-lit night.' He said 'Anaq came along and she saw the darkness of my shadow next to the wall. When she reached me she recognized me and said: Marthad? So I replied: (Yes it is) Marthad. She said: Welcome, come and spend the night with us. I said: O 'Anaq! Allah has made illicit sexual relations unlawful. So she said: O people of the tents! That is the man who takes your captives away! He said: Eight people followed me, and I went through the passes of Al-Khandamah. I stopped at a cave and entered it. They came until they stood over my head, and they began urinating, their urine falling on my head. Yet Allah made them unable to see me. He said: 'Then I went back. I returned to my companion to transport him - and he was a heavy man - until I reached Al-Idhkir. There I removed his shackles to make him easier to carry, since he was exhausting me, until I arrived at Al-Madinah. I went to the Messenger of Allah (ﷺ) and I said O Messenger of Allah! May I marry 'Anaq? [I said this, two times] but the Messenger of Allah (ﷺ) was silent, and he did not reply to me at all until (the following) was revealed: The Zani marries not but a Zaniyah or a Mushrikah; and the Zaniyah, none marries her except a Zani or a Mushrik (24:3). So do not marry her.'

حَدَّثَنَا عَبْدُ بْنُ حُمَيْدٍ، حَدَّثَنَا رَوْحُ بْنُ عُبَادَةَ، عَنْ عُبَيْدِ اللَّهِ بْنِ الْأَخْنَسِ، أَخْبَرَنِي عَمْرُو بْنُ شُعَيْبٍ، عَنْ أَبِيهِ، عَنْ جَدِّهِ، قَالَ:‏‏‏‏ كَانَ رَجُلٌ يُقَالُ لَهُ مَرْثَدُ بْنُ أَبِي مَرْثَدٍ، ‏‏‏‏‏‏وَكَانَ رَجُلًا يَحْمِلُ الْأَسْرَى مِنْ مَكَّةَ حَتَّى يَأْتِيَ بِهِمْ الْمَدِينَةَ، ‏‏‏‏‏‏قَالَ:‏‏‏‏ وَكَانَتِ امْرَأَةٌ بَغِيٌّ بِمَكَّةَ يُقَالُ لَهَا عَنَاقٌ وَكَانَتْ صَدِيقَةً لَهُ، ‏‏‏‏‏‏وَإِنَّهُ كَانَ وَعَدَ رَجُلًا مِنْ أُسَارَى مَكَّةَ يَحْمِلُهُ، ‏‏‏‏‏‏قَالَ:‏‏‏‏ فَجِئْتُ حَتَّى انْتَهَيْتُ إِلَى ظِلِّ حَائِطٍ مِنْ حَوَائِطِ مَكَّةَ فِي لَيْلَةٍ مُقْمِرَةٍ، ‏‏‏‏‏‏قَالَ:‏‏‏‏ فَجَاءَتْ عَنَاقٌ فَأَبْصَرَتْ سَوَادَ ظِلِّي بِجَنْبِ الْحَائِطِ، ‏‏‏‏‏‏فَلَمَّا انْتَهَتْ إِلَيَّ عَرَفَتْهُ، ‏‏‏‏‏‏فَقَالَتْ:‏‏‏‏ مَرْثَدٌ، ‏‏‏‏‏‏فَقُلْتُ:‏‏‏‏ مَرْثَدٌ، ‏‏‏‏‏‏فَقَالَتْ:‏‏‏‏ مَرْحَبًا وَأَهْلًا هَلُمَّ فَبِتْ عِنْدَنَا اللَّيْلَةَ، ‏‏‏‏‏‏قَالَ:‏‏‏‏ قُلْتُ:‏‏‏‏ يَا عَنَاقُ، ‏‏‏‏‏‏حَرَّمَ اللَّهُ الزِّنَا، ‏‏‏‏‏‏قَالَتْ:‏‏‏‏ يَا أَهْلَ الْخِيَامِ، ‏‏‏‏‏‏هَذَا الرَّجُلُ يَحْمِلُ أَسْرَاكُمْ، ‏‏‏‏‏‏قَالَ:‏‏‏‏ فَتَبِعَنِي ثَمَانِيَةٌ وَسَلَكْتُ الْخَنْدَمَةَ، ‏‏‏‏‏‏فانتهيت إلى كهف أو غار فدخلت، ‏‏‏‏‏‏فجاءوا حتى قاموا على رأسي فبالوا، ‏‏‏‏‏‏فطل بولهم على رأسي وأعماهم الله عني، ‏‏‏‏‏‏قَالَ:‏‏‏‏ ثُمَّ رَجَعُوا وَرَجَعْتُ إِلَى صَاحِبِي فَحَمَلْتُهُ وَكَانَ رَجُلًا ثَقِيلًا، ‏‏‏‏‏‏حَتَّى انْتَهَيْتُ إِلَى الْإِذْخِرِ، ‏‏‏‏‏‏فَفَكَكْتُ عَنْهُ كَبْلَهُ، ‏‏‏‏‏‏فَجَعَلْتُ أَحْمِلُهُ يُعِيِنُنِي حَتَّى قَدِمْتُ الْمَدِينَةَ، ‏‏‏‏‏‏فَأَتَيْتُ رَسُولَ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ، ‏‏‏‏‏‏فَقُلْتُ:‏‏‏‏ يَا رَسُولَ اللَّهِ، ‏‏‏‏‏‏أَنْكِحُ عَنَاقًا مَرَّتَيْنِ فَأَمْسَكَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ فَلَمْ يَرُدَّ عَلَيَّ شَيْئًا حَتَّى نَزَلَتْ:‏‏‏‏ الزَّانِي لا يَنْكِحُ إِلا زَانِيَةً أَوْ مُشْرِكَةً وَالزَّانِيَةُ لا يَنْكِحُهَا إِلا زَانٍ أَوْ مُشْرِكٌ وَحُرِّمَ ذَلِكَ عَلَى الْمُؤْمِنِينَ سورة النور آية 3، ‏‏‏‏‏‏فَقَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ:‏‏‏‏ يَا مَرْثَدُ الزَّانِي لَا يَنْكِحُ إِلَّا زَانِيَةً أَوْ مُشْرِكَةً، ‏‏‏‏‏‏وَالزَّانِيَةُ لَا يَنْكِحُهَا إِلَّا زَانٍ أَوْ مُشْرِكٌ، ‏‏‏‏‏‏فَلَا تَنْكِحْهَا . قَالَ أَبُو عِيسَى:‏‏‏‏ هَذَا حَدِيثٌ حَسَنٌ غَرِيبٌ، ‏‏‏‏‏‏لَا نَعْرِفُهُ إِلَّا مِنْ هَذَا الْوَجْهِ.

Explanation
تفسير الحديث

This hadith narrates the story of Mardath ibn Abi Mardath, who used to carry prisoners from Mecca to Medina. It mentions his encounter with a prostitute named `Anaq, who was a friend of his. `Anaq recognized Mardath in the dark and invited him to stay with her, but he remembered Allah's prohibition of zina (fornication) and refused her invitation. After identifying another captive, he carried him until he reached Medina. When Mardath proposed to marry `Anaq, the Prophet Muhammad (peace be upon him) did not respond until Allah revealed a verse prohibiting marriage to adulteresses or polytheists. Ultimately, the Prophet advised Mardath that a fornicator cannot marry except for a fornicator or a polytheist, warning him against marrying `Anaq.

هذا الحديث يتحدث عن قصة مرثد بن أبي مرثد، الذي كان يحمل الأسرى من مكة إلى المدينة، ويذكر قصة لقائه مع امرأة بغى تُدعى عُنَاق، التي كانت صديقة له. وقد أدركت عنُاق مرثد عندما رأته في الظلام. فدعته لمبيته عندها، ولكنه تذكر تحذير الله من الزنا، ورفض دعوتها. ثم بعد أن تعرف على أسير آخر، أخذ يحمل هذا الأسير حتى وصل المدينة. وعندما عرض زواج عنَاق عليه، لم يتجاوب النبي محمد (صلى الله عليه وسلم) معه حتى أنزل الله الآية التي تحظر الزواج من الزواني أو المشركين، وبهذا عزز النبي محمد (ص) أهمية الحفاظ على القيم الأخلاقية وتحريم الزنا. في النهاية، أبلغه النبي أن الزاني لا ينكح إلا زانية أو مشركة، وحذر مرثد من الزواج بعُنَاق.

Source: Jami' Al-Tirmidhi by Abu `Isa Muhammad at-Tirmidhi