The principle in Shari`ah is that a woman is not to travel by herself; rather, it is obligatory for her to be accompanied by her husband or a mahram (close male relative). Since the true intent of the prohibition is safety and protection, she is allowed to travel in a safe company accompanied by reputable Muslim men and women.
Sheikh Ahmad Kutty, a senior lecturer and Islamic scholar at the Islamic Institute of Toronto, Ontario, Canada, states: It is permissible for a woman to go for Hajj if she can travel in a safe company where she can feel reasonably secure and protected. Islam is a religion that is wholly based on mercy and compassion; its teachings are aimed at protecting the weak and the vulnerable. It is therefore with the specific intent of safeguarding a woman’s honor, dignity, and reputation that the Prophet (peace and blessings be upon him) forbade women from undertaking long journeys without a mahram. Since the true intent of the prohibition is safety and protection, women are allowed to travel in a safe company accompanied by elders and reputable Muslim men and women.
That is why we read in the sources that the Mothers of the Faithful such as `A’ishah and Umm Salamah, themselves well known for their deep knowledge of Islam and expertise in Islamic jurisprudence, travelled without mahrims in a safe company. They travelled in a group under the protection of older men. Once `A’ishah was asked whether a woman can travel without a mahram. Her answer was, “Can everyone find a mahram?” In other words, if she has a genuine need to travel, she may do so if she can be reasonably assured of her own safety. Based on the above considerations, a number of jurists and scholars belonging to the Maliki and Shafi`i schools, as well as others, have considered it permissible for women to travel in a safe company.