Ibn Abbas reported: The Prophet, peace and blessings be upon him, said, “A man should not be alone with a woman, nor should a woman travel unless a guardian is with her.” A man stood up and said, “O Messenger of Allah, I have been assigned to a military expedition, but my wife has already left for the Hajj pilgrimage.” The Prophet said, “Go and perform the pilgrimage with your wife.”
Source: Ṣaḥīḥ al-Bukhārī 3006, Ṣaḥīḥ Muslim 1341
Grade: Muttafaqun Alayhi (authenticity agreed upon) according to Al-Bukhari and Muslim
عَنْ ابْنِ عَبَّاسٍ قَالَ قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ لَا يَخْلُوَنَّ رَجُلٌ بِامْرَأَةٍ وَلَا تُسَافِرَنَّ امْرَأَةٌ إِلَّا وَمَعَهَا مَحْرَمٌ فَقَامَ رَجُلٌ فَقَالَ يَا رَسُولَ اللَّهِ اكْتُتِبْتُ فِي غَزْوَةِ كَذَا وَكَذَا وَخَرَجَتْ امْرَأَتِي حَاجَّةً قَالَ اذْهَبْ فَحُجَّ مَعَ امْرَأَتِكَ
3006 صحيح البخاري كتاب الجهاد والسير باب من اكتتب في جيش فخرجت امرأته حاجة أو كان له عذر هل يؤذن له
1341 صحيح مسلم كتاب الحج باب سفر المرأة مع محرم إلى حج وغيره