Masjid Quba is the first masjid built in Islam, established by Nabi Muhammad upon his arrival in the Madinah area during the Hijrah (622 CE). The Al-Quran describes it as 'a masjid founded on righteousness' (9:108). Nabi said praying there equals the reward of an Umrah (Tirmidhi).
Masjid Quba holds the distinction of being the first masjid built in Islam. When Nabi Muhammad (shallallahu alaihi wa sallam) arrived in the Quba area (a village on the southern outskirts of Madinah) during the Hijrah from Mekkah in 622 CE, he stayed there for several days and laid the foundations of this masjid before proceeding to the center of Madinah. The masjid was originally a simple structure, and Nabi and his companions physically participated in its construction. The Al-Quran refers to Masjid Quba: 'A masjid 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).
Nabi Muhammad (shallallahu alaihi wa sallam) used to visit Masjid Quba every Saturday, either walking or riding, and would pray two rak'ahs 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 Umrah' (Tirmidhi, Nasa'i, Ibn Majah). This hadith establishes Masjid Quba as one of the most rewarding places for shalat in the world — each visit with shalat carries the reward equivalent to an Umrah. This makes visiting Quba during a stay in Madinah an opportunity that jamaah haji should not miss.
The modern Masjid Quba has been expanded significantly from its original humble structure. The current masjid, 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 masjid is open for all five daily shalat and is particularly popular on Saturdays, following Nabi's sunnah of visiting on that day. Pilgrim groups typically include a Quba visit as part of their Madinah ziyarah (tour of historical sites).