Initially it is forbidden for the Muslim woman to travel without being accompanied by her husband or a Mahram. But the Fuqaha (scholars of Islamic jurisprudence) excepted from this prohibition, the cases of necessity like the emigrating woman or the one who is a prisoner. They allowed women in such critical situations to travel without a Mahram or husband.