Muslims gather for worship in buildings called mosques (Arabic, masajid). The Prophet Muhammad built the first mosque in the courtyard of his house in Medina in 622 to provide a place for Muslims to gather for prayer and for community. The earliest mosques were modeled after Muhammad's in both design and purpose, and despite a wide variety in architectural styles, contemporary mosques still embrace the general features of Muhammad's initial design.
Outer rooms surround a courtyard or large open area used for prayer, which is sometimes covered by a roof. The floor is covered with mats or carpets. A niche set into the wall, called a mihrab, indicates the direction of Mecca, and thus the direction in which to pray. Next to the mihrab is the minbar, a platform used by the prayer leader to deliver the Friday sermon. Women and men are segregated in the mosque, so there may be a chamber set aside for women or a curtain separating the men from the women. Muslims perform ritual cleansing before prayer in an outer courtyard called a ziyadah. From a tower outside the mosque, called a minaret, the muezzin calls the faithful to prayer five times a day. There are no pictures or statues, and ritual objects are not needed. The walls are decorated with patterned mosaics, verses from the Quran, and occasionally the names of Muhammad and his companions. The styles range from very simple to monumental.
Many Muslims visit the mosque for all five of the daily prayers. The mosque is host to public activities as well as prayer. It is a place to gather and socialize, to find help and information and comfort in times of crisis, to discuss business agreements, and to engage in political discussion and debate. Mosques provide religious education, and aid in the collection and distribution of zakat, the charitable donations that form one of the Five Pillars. Muslims visit the mosque before and after pilgrimage, and will bring the bodies of deceased family members to the mihrab for prayers before burial.
The mosques at Medina, Mecca, and Jerusalem have special status. There is a hadith that says if a person visits the mosque at Medina, Muhammad will intercede for him or her on the Day of Judgment. The al-Aqsa mosque in Jerusalem (not to be confused with the Dome of the Rock) is said to stand on the site of Muhammad's famous Night Journey. The Dome of the Rock stands on the site of Muhammad's ascent into heaven with the angel Gabriel. The Grand Mosque in Mecca holds the Kaaba, a shrine near its center. For Muslims, this is the most sacred place in the world, called the "House of God." The Kaaba pre-dates Islam, and tradition holds that one of Muhammad's first actions upon entering Mecca as its conqueror was to destroy all idols and shrines, dedicating the Kaaba to Allah, the one true God, and performing the Islamic rites of pilgrimage. No matter where they are in the world, Muslims face in the direction of the Kaaba in Mecca when they pray. The dead are buried with their heads pointing in the direction of the Kaaba.
Kaaba means cube, and that is the shape of the shrine. Its corners align with the four points of the compass. The interior is nearly empty, with only three pillars supporting the roof, and ceiling lamps made of gold and silver. Islamic tradition holds that after he and Eve were expelled from paradise, Adam built the Kaaba, which is a copy of God's heavenly house. Adam's shrine was destroyed in Noah's flood, except for the foundation, and Abraham and Ishmael rebuilt it. Later, Muhammad also rebuilt the Kaaba and was entrusted to place the cornerstone in the building.