Origins According to historical Islamic texts, during the
hijrah (migration) of
Muhammad from
Mecca to
Medina (Yathrib), he stopped in the village of Quba' near Medina. Depending on the sources, he stayed there for 3 to 22 days. Two different accounts of the mosque's foundation exist in relation to this event. In one, Muhammad founded the mosque himself, though there are varying explanations for how the site was chosen: it was either a (place for drying dates) that belonged to Muhammad's host, Kulthum, or it was the place where a woman named Labba had tethered her donkey. Another version, probably a later legend inspired by the foundation story of the
Prophet's Mosque in Medina, tells that Muhammad made
Ali get on a camel and then built the mosque where the camel went. Muhammad is said to have laid the first stone himself, with the next ones laid by
Abu Bakr,
Umar and
Uthman. He is also said to have visited the mosque every Saturday afterwards and conducted religious service there. The first mosque would have been oriented towards
Jerusalem and Muhammad most likely rebuilt it when the
qibla (direction of prayer) was changed toward the
Kaaba in Mecca. Another expansion occurred in 684 CE, during the reign of the
Umayyad caliph
Abd al-Malik ibn Marwan. Its first "
minaret" was added under
Umar ibn Abd al-Aziz ().
King Fahd expansion (1984–1986) The present-day mosque is the result of a complete reconstruction that began in 1984 under
Saudi king
Fahd bin Abdulaziz. The project aimed to maintain the mosque's traditional Islamic architectural elements while significantly increasing its capacity to accommodate 20,000 worshipers. The reconstructed mosque was built using traditional hollow clay blocks, without formwork concrete. King Fahd laid the foundation stone for the expansion on November 3, 1984, and the project was completed two years later, with its inauguration on November 2, 1986. This expansion reshaped the mosque from a square to a rectangular layout, featuring a central courtyard accessible from all entrances. A dedicated women's prayer area was established in the northern section, spanning two floors and accommodating approximately 7,000 female worshipers.Following this expansion, the mosque featured four minarets and 56 domes. It also included accommodations for
Imams and
Muezzins, and a library. The mosque's land area measured , with the building itself covering .
King Salman expansion On April 8, 2022,
Crown Prince Mohammed bin Salman announced the launch of the largest expansion in the history of the Quba Mosque, along with the development of its surrounding area. The project was named after
King Salman bin Abdulaziz. This expansion aims to increase the mosque's total area tenfold, from , increasing its capacity to 66,000 worshipers. The project is focused on connecting the existing mosque with covered plazas on all four sides, functionally and visually linked to independent prayer areas not structurally attached to the existing building. When completed, it will also provide all necessary services for the mosque, improve the efficiency of the existing building and its associated services, and enhance the surrounding road network and infrastructure to improve crowd management, accessibility, and the safety and security of worshipers. Additionally, it aims to develop and revitalize several historical sites and landmarks within the mosque and its surrounding areas. In March 2023, the responsibility for overseeing and operating the Quba Mosque was transferred to the
Al Madinah Region Development Authority from the
Ministry of Islamic Affairs, Dawah, and Guidance. == Religious significance ==