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.'" (Using translation from Tirmidhī 3177)
يَا أَهْلَ الْخِيَامِ هَذَا الرَّجُلُ الَّذِي يَحْمِلُ أَسْرَاكُمْ فَاتَّبِعْنِي ثَمَانِيَةٌ وَسَلَكْتُ الْخَنْدَمَةَ فَانْتَهَيْتُ إِلَى كَهْفٍ أَوْ غَارٍ فَدَخَلْتُهُ فَجَاءُوا حَتَّى جَازُوا عَلَى رَأْسِي فَبَالُوا فَظَلَّ بَوْلُهُمْ عَلَى رَأْسِي وَأَعْمَاهُمُ اللهُ حَتَّى رَجَعُوا وَرَجَعْتُ إِلَى صَاحِبِي وَحَمَلْتُهُ وَكَانَ رَجُلًا ثَقِيلًا حَتَّى انْتَهَيْتُ إِلَى الْإِذْخِرِ فَفَكَكْتُ عَنْهُ كَبْلَهُ فَجَعَلْتُ أَحْمِلُهُ وَيُعْيِينِي حَتَّى قَدِمْتُ الْمَدِينَةَ فَأَتَيْتُ رَسُولَ اللهِ ﷺ فَقُلْتُ يَا رَسُولَ اللهِ أَنْكِحُ عَنَاقًا؟ فَأَمْسَكَ رَسُولُ اللهِ ﷺ فَلَمْ يَرُدَّ عَلَيَّ شَيْئًا حَتَّى نَزَلَتْ هَذِهِ السُّورَةُ وَهِيَ قَوْلُهُ تَعَالَى {الزَّانِي لَا يَنْكِحُ إِلَّا زَانِيَةً أَوْ مُشْرِكَةً وَالزَّانِيَةُ لَا يَنْكِحُهَا إِلَّا زَانٍ أَوْ مُشْرِكٌ وَحُرِّمَ ذَلِكَ عَلَى الْمُؤْمِنِينَ} [النور 3] فَقَالَ رَسُولُ اللهِ ﷺ يَا مَرْثَدُ الزَّانِي لَا يَنْكِحُ إِلَّا زَانِيَةً أَوْ مُشْرِكَةً وَالزَّانِيَةُ لَا يَنْكِحُهَا إِلَّا زَانٍ أَوْ مُشْرِكٌ