The prophet Muhammad is credited with building the first mosque in the courtyard of his house in Medina. Mosques today follow some of the same principles he established in 622 A.D.
Muslim prayer is often conducted in a mosque’s large open space or outdoor courtyard. A mihrab is a decorative feature or niche in the mosque that indicates the direction to Mecca, and therefore the direction to face during prayer.
Men and women pray separately, and Muslims may visit a mosque five times a day for each of the prayer sessions. In addition to hosting prayers, mosques often function as public gathering places and social centers.