In the name of Allah, the Beneficent, the Merciful
A Muslim woman must travel with her guardian (mahram) such as her husband or father during an extended journey in which there is potential danger, but when no reasonable expectation of danger exists then she only needs the permission of her guardian.
The Prophet did not allow women to travel alone at night for an extended period of time because at the time of the Prophet the roads were not safe due to the presence of thieves and wild animals.
Abu Huraira reported: The Messenger of Allah, peace and blessings be upon him, said:
لَا يَحِلُّ لِامْرَأَةٍ تُؤْمِنُ بِاللَّهِ وَالْيَوْمِ الْآخِرِ أَنْ تُسَافِرَ مَسِيرَةَ يَوْمٍ وَلَيْلَةٍ لَيْسَ مَعَهَا حُرْمَةٌ
It is not lawful for a woman who believes in Allah and the Last Day to travel for a day and a night without her guardian.
Source: Sahih Bukhari 1038, Grade: Sahih
This prohibition is not meant to burden women, but rather to protect them from dangers associated with travel. The Prophet likewise warned all Muslims about the dangers of travelling alone at night.
Ibn Umar reported: The Messenger of Allah, peace and blessings be upon him, said:
لَوْ يَعْلَمُ النَّاسُ مَا فِي الْوَحْدَةِ مَا أَعْلَمُ مَا سَارَ رَاكِبٌ بِلَيْلٍ وَحْدَهُ
If people knew the dangers of traveling alone, then no one would travel alone at night.
Source: Sahih Bukhari 2836, Grade: Sahih
The requirement for women to be accompanied by a guardian is so important that the Prophet once told a man to leave his military duties in order to accompany his wife who was on a journey to Mecca.
Ibn Abbas reported: The Messenger of Allah, peace and blessings be upon him, said:
لَا يَخْلُوَنَّ رَجُلٌ بِامْرَأَةٍ وَلَا تُسَافِرَنَّ امْرَأَةٌ إِلَّا وَمَعَهَا مَحْرَمٌ
No unmarried man should be alone with a woman, and a woman should not travel except with her guardian.
A man stood up and said, “O Messenger of Allah, I have been enrolled in an expedition and my wife has left for the Hajj pilgrimage.” The Prophet said:
اذْهَبْ فَحُجَّ مَعَ امْرَأَتِكَ
Go and perform the pilgrimage with your wife.
Source: Sahih Bukhari 2844, Grade: Muttafaqun Alayhi
Therefore, the general rule is that a Muslim woman should travel with a guardian so that she will be protected from any danger she might encounter.
However, some scholars have said this condition is not required if it is certain a woman is travelling without a reasonable expectation of danger. This is based upon the following narrations.
Adi ibn Hatim reported: The Messenger of Allah, peace and blessing be upon him, said:
فَإِنْ طَالَتْ بِكَ حَيَاةٌ لَتَرَيَنَّ الظَّعِينَةَ تَرْتَحِلُ مِنَ الْحِيرَةِ حَتَّى تَطُوفَ بِالْكَعْبَةِ لاَ تَخَافُ أَحَدًا إِلاَّ اللَّهَ
If you live long enough, you will see a woman travelling by camel from Iraq to perform circulation around the Ka’bah while fearing none but Allah.
Source: Sahih Bukhari 3595, Grade: Sahih
In another narration, the Prophet said:
فَإِنَّ اللَّهَ نَاصِرُكُمْ وَمُعْطِيكُمْ حَتَّى تَسِيرَ الظَّعِينَةُ فِيمَا بَيْنَ يَثْرِبَ وَالْحِيرَةِ أَكْثَرُ مَا تَخَافُ عَلَى مَطِيَّتِهَا السَّرَقَ
Verily, Allah will support you until a woman will travel by camel from Medina and Iraq and elsewhere without fear of thieves.
Source: Sunan At-Tirmidhi 3211, Grade: Hasan
These narrations demonstrate that the reason a woman is required to travel with a guardian is to protect her from thieves, wild animals, and other dangers on the road. So when a reasonable expectation of danger does not exist, then scholars have given women permission to travel without a guardian.
Al-Baji Al-Maliki writes:
ولعل هذا الذي ذكره بعض أصحابنا إنما هو في حال الانفراد والعدد اليسير فأما القوافل العظيمة والطرق المشتركة العامرة المأمونة فإنها عندي مثل البلاد التي يكون فيها الأسواق والتجار فإن الأمن يحصل لها دون ذي محرم ولا امرأة وقد رُوِيَ هذا عن الأوزاعي
Perhaps what some of our scholars have said regarding the prohibition refers only to cases where the woman is alone or with a small group. As for the great caravans and the secured roadways, they are no different to me than the places of residence that are filled with markets and merchants. In such cases, her safety is secured without the presence of a guardian or female companions. This opinion has been related to us from al-Awza’i.
Source: Al-Muntaqa Sharh Al-Muwatta 3/95
In modern times, a woman can travel longer distances by automobile and airplane without a reasonable expectation of danger, so in this case it is permissible for a woman to travel without a guardian, but in any case a woman still requires permission from her guardian before undertaking a journey.
Success comes from Allah, and Allah knows best.