Islamic law requires men and women to be separated in the prayer hall. Ideally, women should pray behind men. The second caliph Umar at one time stopped women from attending mosques, especially at night, because he feared they may be teased by males, so he made them to pray at home. Sometimes a special part of the mosque was railed off for women; for example, the governor of Mecca in 870 had ropes tied between the columns to make a separate place for women.