Great Mosque of Mecca, Arabic al-Masjid al-Ḥarām, also called Holy Mosque or Haram Mosque, a mosque in Mecca built to enclose the Kaʿbah, the holiest shrine in Islam. As one of the destinations of the hajj and ʿumrah pilgrimages, it receives millions of worshippers each year. The oldest parts of the modern structure date to the 16th century.
The mosque, which comprises a rectangular central courtyard surrounded by covered prayer areas, is the site of several pilgrimage rituals. Pilgrims use the courtyard to perform the ritual circumambulation of the Kaʿbah, known as the ṭawāf. Two more sacred sites are located in the courtyard: the station of Abraham (Arabic: maqām Ibrāhīm), a stone which Islamic tradition associates with the Qurʾānic account of the rebuilding of the Kaʿbah by Abraham and Ismāʿīl (Ishmael), and the Zamzam well, a sacred spring. Immediately to the east and north of the courtyard are al-Ṣafā and al-Marwah, two small hills which pilgrims must run or walk between in a ritual known as the saʿy. In the 20th century an enclosed passageway between the two hills was appended to the mosque.
The modern building is the product of centuries of development. In the pre-Islamic era, the Kaʿbah, then a shrine for Arab polytheists, stood in an open space where worshippers gathered to pray and perform rituals. The Kaʿbah was also sacred to the first followers of the Prophet Muhammad. Following the Muslims’ emigration to Medina in 622 ce (the Hijrah), Muslims briefly prayed toward Jerusalem until a Qurʾānic revelation designated the Kaʿbah as the qiblah, or direction of prayer. When Muhammad returned to Mecca in 630, he ordered the destruction of the idols that were kept in the shrine, cleansing it of polytheistic associations.
The first Muslim structure on the site was a wall around the Kaʿbah, built by the second caliph, ʿUmar ibn al-Khaṭṭāb, in 638. Succeeding caliphs added partial ceilings, columns, and decorative embellishments. A more extensive renovation took place under the ʿAbbāsid caliph al-Mahdī (775–785), who rebuilt and expanded the structure, relocating the outer walls so that the Kaʿbah stood in the centre of the courtyard. The mosque was rebuilt again in the early 14th century after it was damaged by fire and flooding. Another renovation of the mosque was undertaken in 1571, when the Ottoman sultan Selim II directed the court architect Sinan to make improvements to the building. Sinan replaced the flat roof with small domes. The Ottoman additions are the oldest remaining parts of the modern structure.
The mosque was modernized and enlarged several times in the 20th century. The first electric lighting system was installed during the reign of Ḥusayn ibn ʿAlī (emir of Mecca 1908–16 and king of Hejaz 1916–24). An electric public-address system was first used in the mosque in 1948. The most drastic changes to the mosque came in the second half of the 20th century, when the rise of commercial air travel increased the number of pilgrims to Mecca and Saudi Arabia’s new oil wealth enabled its rulers to fund massive construction projects. The first Saudi enlargement of the mosque began in 1955 during the reign of King Saʿūd. The expansion, completed in 1973, added new construction around the Ottoman mosque, expanding the total area of the structure from about 290,000 square feet (27,000 square meters) to about 1,630,000 square feet (152,000 square meters) and increasing its maximum capacity to 500,000. The passageway between al-Ṣafā and al-Marwah was expanded and integrated into the structure of the mosque.