Masjid Quba is the first مسجد بُني في Islam, أُسس by النبي Muhammad upon his arrival in the المدينة area during the Hijrah (622 CE). The القرآن describes it as 'a مسجد founded on righteousness' (9:108). النبي said praying there equals the reward of an العمرة (Tirmidhi).
Masjid Quba holds the distinction of being the first مسجد بُني في Islam. When النبي Muhammad (صلى الله عليه وسلم) arrived in the Quba area (a village on the southern outskirts of المدينة) during the Hijrah from مكة in 622 CE, he stayed there for several days and laid the foundations of this مسجد before proceeding to the center of المدينة. The مسجد was originally a simple structure, and النبي and his companions physically participated in its construction. The القرآن refers to Masjid Quba: 'A مسجد founded on righteousness from the first day is more worthy for you to stand in. Within it are men who love to purify themselves; and Allah loves those who purify themselves' (9:108).
النبي Muhammad (صلى الله عليه وسلم) used to visit Masjid Quba every Saturday, either walking or riding, and would pray two ركعةs there (Bukhari and Muslim). He said: 'Whoever purifies himself in his house, then comes to Masjid Quba and prays in it, he will have the reward of an العمرة' (Tirmidhi, Nasa'i, Ibn Majah). This hadith establishes Masjid Quba as one of the most rewarding places for الصلاة in the world — each visit with الصلاة carries the reward equivalent to an العمرة. This makes visiting Quba during a stay in المدينة an opportunity that الحجاج should not miss.
The modern Masjid Quba has been expanded significantly from its original humble structure. The current مسجد, rebuilt and expanded during Saudi rule, is a large, elegant facility with white minarets, marble courtyards, and modern amenities. It is located approximately 5 kilometers south of Masjid al-Nabawi and is easily accessible by taxi or public transport. The مسجد is open for all five daily الصلوات and is particularly popular on Saturdays, following النبي's سنة of visiting on that day. Pilgrim groups typically include a Quba visit as part of their المدينة ziyarah (tour of historical sites).