The night which the Messenger of Allah ﷺ passed with me was the one that followed the day of sacrifice. He came to me and Wahb ibn Zam'ah also visited me. A man belonging to the lineage of AbuUmayyah accompanied him. Both of them were wearing shirts. The Messenger of Allah ﷺ said to Wahb: Did you perform the obligatory circumambulation (Tawaf az-Ziyarah), AbuAbdullah? He said: No, by Allah Messenger of Allah. He (the Prophet) said: Take off your shirt. He then took it off over his head, and his companion too took his shirt off over his head. He then asked: And why (this), Messenger of Allah? He replied: On this day you have been allowed to take off ihram when you have thrown the stones at the jamrahs, that is, everything prohibited during the state of ihram is lawful except intercourse with a woman. If the evening comes before you go round this House (the Ka'bah) you will remain in the sacred state (i.e. ihram), just like the state in which you were before you threw stones at the jamrahs, until you perform the circumambulation of it (i.e. the Ka'bah).
عَنْ أُمِّ سَلَمَةَ يُحَدِّثَانِهِ جَمِيعًا ذَاكَ عَنْهَا قَالَتْ كَانَتْ لَيْلَتِي الَّتِي يَصِيرُ إِلَىَّ فِيهَا رَسُولُ اللَّهِ ﷺ مَسَاءَ يَوْمِ النَّحْرِ فَصَارَ إِلَىَّ وَدَخَلَ عَلَىَّ وَهْبُ بْنُ زَمْعَةَ وَمَعَهُ رَجُلٌ مِنْ آلِ أَبِي أُمَيَّةَ مُتَقَمِّصَيْنِ فَقَالَ رَسُولُ اللَّهِ ﷺ لِوَهْبٍ هَلْ أَفَضْتَ أَبَا عَبْدِ اللَّهِ قَالَ لاَ وَاللَّهِ يَا رَسُولَ اللَّهِ قَالَ ﷺ انْزِعْ عَنْكَ الْقَمِيصَ قَالَ فَنَزَعَهُ مِنْ رَأْسِهِ وَنَزَعَ صَاحِبُهُ قَمِيصَهُ مِنْ رَأْسِهِ ثُمَّ قَالَ وَلِمَ يَا رَسُولَ اللَّهِ قَالَ إِنَّ هَذَا يَوْمٌ رُخِّصَ لَكُمْ إِذَا أَنْتُمْ رَمَيْتُمُ الْجَمْرَةَ أَنْ تَحِلُّوا يَعْنِي مِنْ كُلِّ مَا حَرُمْتُمْ مِنْهُ إِلاَّ النِّسَاءَ فَإِذَا أَمْسَيْتُمْ قَبْلَ أَنْ تَطُوفُوا هَذَا الْبَيْتَ صِرْتُمْ حُرُمًا كَهَيْئَتِكُمْ قَبْلَ أَنْ تَرْمُوا الْجَمْرَةَ حَتَّى تَطُوفُوا بِهِ