The history and significance of Masjid Quba in Madinah — the first mosque built in Islam — its mention in the Qur'an, the reward of praying there, and a visitor's guide.
When the Prophet Muhammad ﷺ completed his migration from Makkah, the very first thing he established in the area of Madinah was not a home or a market, but a mosque. On the outskirts of the city, in a settlement called Quba, he laid the foundation of what would become the first mosque in the history of Islam. Fourteen centuries later, pilgrims still go out of their way to pray there — and there is a beautiful reason why.
This guide covers the story of Masjid Quba, its place in the Qur'an, the reward attached to it, and what to know if you visit.
Quick answer: Masjid Quba is the first mosque built in Islam, founded by the Prophet ﷺ when he arrived during the Hijrah in 622 CE, in the Quba district about 5 km south of Al-Masjid an-Nabawi. It is referred to in the Qur'an as a mosque "founded on piety." The Prophet ﷺ used to visit it regularly, and an authentic narration mentions that praying two rak'ahs there — after purifying oneself at home — carries the reward of an Umrah.
Where Is Masjid Quba?
Masjid Quba sits in the Quba neighbourhood on the southern side of Madinah, roughly 5 kilometres from Al-Masjid an-Nabawi (the Prophet's Mosque). In the Prophet's time, Quba was a settlement just outside the city; today, Madinah has grown around it, and a wide, shaded pedestrian boulevard connects the two mosques.
The original mosque was modest. Over the centuries — and especially in modern times — it has been rebuilt and greatly expanded into the large, multi-domed structure visitors see now.
The Story of the First Mosque
Founded during the Hijrah
As the Prophet ﷺ migrated from Makkah to Madinah, he stopped first at Quba and stayed there for several days. During this stay he established the mosque, taking part in its construction himself. This made Masjid Quba the first mosque founded in Islam — built before the Prophet's Mosque in the city centre.
Mentioned in the Qur'an
The mosque is widely understood to be referred to in Surah At-Tawbah:
"A mosque founded on piety 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." (Surah At-Tawbah, 9:108)
Most commentators identify the "mosque founded on piety" in this verse with Masjid Quba, though some apply it to Al-Masjid an-Nabawi; either way, the verse honours the spirit of sincere worship that Quba represents from its very first day.
The Reward of Praying at Quba
What draws many visitors is a specific, encouraging narration. The Prophet ﷺ said that whoever purifies himself in his home, then goes to the mosque of Quba and prays in it, will have a reward like that of an Umrah. This is a sound narration reported in the collections of Sunan, and it is why so many pilgrims make the short journey south to pray two rak'ahs there.
The Prophet ﷺ also kept up a personal connection with the mosque throughout his life in Madinah. It is authentically reported that he used to visit Masjid Quba every Saturday, sometimes riding and sometimes walking, and pray two units of prayer there.
A point worth keeping clear: the reward is tied to praying at the mosque with the right intention and preparation — not to touching the walls, taking objects, or any practice beyond worship.
Visiting Masjid Quba Today
A visit is easy and rewarding, and unlike the mountain sites of Makkah, it asks nothing strenuous of you.
| Quick facts | Masjid Quba |
|---|---|
| Location | Quba district, ~5 km south of Al-Masjid an-Nabawi |
| Significance | First mosque built in Islam |
| Qur'anic reference | Surah At-Tawbah (9:108) |
| Special virtue | Praying there ≈ reward of an Umrah (after purifying at home) |
| Prophet's practice | Visited every Saturday to pray two rak'ahs |
| Effort to visit | Easy — short drive or walk from the city centre |
A few practical tips:
- Make wudu at your hotel. The narration specifically mentions purifying yourself at home before coming to pray — so perform your wudu before you set out.
- Go with the intention to pray, not just to sightsee. Two rak'ahs is the heart of the visit.
- Pick a quieter time. Mornings outside the busiest seasons are calmer. Friday and peak Umrah/Hajj periods can be very crowded.
- Observe mosque etiquette as you would at any masjid — modest dress, calm conduct, and respect for those praying.
Fitting Quba Into Your Trip
Masjid Quba pairs naturally with the other historical sites of Madinah. Many visitors combine it with Mount Uhud, the site of the famous battle to the north of the city, and Masjid al-Qiblatain, where the direction of prayer was changed toward Makkah.
To base yourself well for all of this, our guide to the best areas to stay in Madinah near Al-Masjid an-Nabawi breaks down the neighbourhoods and walking distances, and a Saudi eSIM keeps your maps and messaging working as you move between sites. You can explore more from our Madinah travel hub. If you're arriving from Makkah, see how to travel between Makkah and Madinah.
Frequently Asked Questions
What is Masjid Quba?
Masjid Quba is the first mosque built in Islam. The Prophet Muhammad ﷺ founded it on the outskirts of Madinah, in the Quba district, when he arrived during the Hijrah in 622 CE.
Where is Quba Mosque located?
It is in the Quba neighbourhood on the southern side of Madinah, about 5 kilometres from Al-Masjid an-Nabawi, connected by a wide pedestrian boulevard.
Is praying at Quba Mosque equal to Umrah?
An authentic narration states that whoever purifies himself at home, then goes to Masjid Quba and prays there, will have a reward like that of an Umrah. The virtue is tied to praying there with the proper intention and preparation.
Is Masjid Quba mentioned in the Qur'an?
It is widely understood to be the "mosque founded on piety" referred to in Surah At-Tawbah (9:108), although some scholars apply that verse to Al-Masjid an-Nabawi.
Did the Prophet ﷺ visit Quba regularly?
Yes. It is authentically reported that the Prophet ﷺ used to visit Masjid Quba every Saturday, sometimes walking and sometimes riding, and pray two rak'ahs there.
Do I need to make wudu before visiting Quba?
The narration about the reward specifically mentions purifying yourself at home before coming to pray, so it is best to perform your wudu before you set out.
The Bottom Line
Masjid Quba is a gentle, joyful visit — no climb, no hardship, just a short journey to the first mosque the Prophet ﷺ ever built, and the chance to earn the reward of an Umrah for two simple rak'ahs. Make your wudu before you go, set your intention to pray, and follow in a habit the Prophet ﷺ himself kept every week.
Last updated: June 2026. This article is informational; for matters of personal religious practice, consult a qualified scholar.




