Masjid Quba is the first mosque built by the Prophet Muhammad ﷺ. It stands about 3 km south of Masjid an-Nabawi in Madinah. The Prophet ﷺ laid its foundations when he arrived from Makkah on the Hijrah in 622 CE.
It is also a place of great reward. A hadith graded hasan (good) says that a prayer there, after making wudu at home, brings a reward like that of an Umrah. That is why so many pilgrims make time to visit.
This guide covers the history of the mosque, the verse and hadith about it and why pilgrims go on Saturdays. It then explains how far it is from Masjid an-Nabawi, how to get there, the walkway and tips for your visit. Some UK towns also have a local mosque called Quba, but this guide is about the original in Madinah.
Quick answer
- Quba is the first mosque built by the Prophet ﷺ, founded when he reached Madinah on the Hijrah in 622 CE.
- A prayer there, after making wudu at home, carries a reward like an Umrah (Sunan Ibn Majah 1412, graded hasan).
- It is about 3 km south of Masjid an-Nabawi, and a 3 km walkway links the two mosques.
- The Prophet ﷺ used to visit every Saturday, walking or riding (Sahih al-Bukhari 1193).
What is Masjid Quba?
It is the mosque the Prophet ﷺ built at Quba, then a village on the edge of Madinah, when he arrived from Makkah. The Saudi Press Agency describes it as the first mosque established in Islam. Today it is a large white mosque where all five daily prayers are held.
In the Prophet’s time, Quba was a village of gardens and palm trees, two or three miles from the centre of Madinah. Saudipedia, the encyclopedia published by the Saudi Ministry of Media, says the mosque took its name from a well called Quba. In early times, it was also known as the Bani Awf Mosque.
You will see the name spelt in several ways, including Quba Mosque, Masjid e Quba and Masjid al-Quba. They all refer to the same place.
The building you see today dates from the 1980s. It has four minarets, 62 domes and separate sections for men and women on two floors, according to Saudipedia. There are seven main entrances and twelve smaller ones, so agree a meeting point before you go in.
The mosque is overseen by the Madinah Region Development Authority. Its courtyard is covered with heat-reflecting marble and shaded by canopies that fold open and closed, which helps in the heat of the day.
The history of Quba Mosque
The Prophet ﷺ founded the mosque in 622 CE, during the Hijrah, before he entered the centre of Madinah. It has been repaired and enlarged many times since. The building you see today comes from a major Saudi rebuilding that opened in 1987.
The Hijrah was the Prophet’s migration from Makkah to Madinah with his companion Abu Bakr. The Islamic calendar counts its years from this journey. On reaching Madinah, the Prophet ﷺ stopped first in its upper part, with a clan called Banu Amr ibn Awf (Sahih al-Bukhari 3932).
He arrived on a Monday in the month of Rabi al-Awwal. Some of the people who came out to greet him had never seen him before. They only knew who he was when Abu Bakr stepped forward to shade him from the sun with his sheet (Sahih al-Bukhari 3906).
The same narration records what happened next:
“Allah’s Messenger (ﷺ) stayed with Bani ‘Amr bin ‘Auf for ten nights and established the mosque (mosque of Quba) which was founded on piety.”
Reference: Sahih al-Bukhari 3906
Reports differ on the length of his stay. This narration says ten nights, while Anas ibn Malik reported fourteen (Sahih al-Bukhari 3932). The Prophet ﷺ prayed in the new mosque, then rode on into Madinah, where he built his own mosque, Masjid an-Nabawi.
After his time, the mosque was rebuilt many times. Saudipedia records that Uthman ibn Affan carried out its first renovation. Later, Umar ibn Abd al-Aziz added new buildings and its first minaret, between 705 and 712 CE.
Many rulers and donors restored it again over the following centuries. In the Saudi era, King Abdulaziz ordered a straight road between Masjid an-Nabawi and Quba in 1932. In 1968, under King Faisal, its outer walls were renewed and extended to the north.
In 1985, King Fahd ordered the mosque to be rebuilt and enlarged from 1,600 to 13,500 square metres, nearly nine times its old size. The new design kept the heritage of the old mosque, and four minarets, each 47 metres tall, replaced the single old one. The new mosque opened in 1987.

Quba in the Quran: a mosque founded on piety
Many scholars link Quba to Surah at-Tawbah, verse 108, which praises “a mosque founded on righteousness from the first day”. The verse contrasts it with a mosque built by hypocrites to cause harm, where the Prophet ﷺ was told never to pray.
لَا تَقُمْ فِيهِ أَبَدًا ۚ لَّمَسْجِدٌ أُسِّسَ عَلَى ٱلتَّقْوَىٰ مِنْ أَوَّلِ يَوْمٍ أَحَقُّ أَن تَقُومَ فِيهِ ۚ فِيهِ رِجَالٌ يُحِبُّونَ أَن يَتَطَهَّرُوا۟ ۚ وَٱللَّهُ يُحِبُّ ٱلْمُطَّهِّرِينَ
La taqum fihi abada. La-masjidun ussisa ‘alat-taqwa min awwali yawmin ahaqqu an taquma fih. Fihi rijalun yuhibbuna an yatatahharu, wallahu yuhibbul-muttahhirin.
“Do not stand [for prayer] within it – ever. A mosque 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 Allāh loves those who purify themselves.”
Reference: Quran 9:108, Saheeh International translation
The verse before it, Quran 9:107, describes the other building as “a mosque for causing harm and disbelief and division among the believers”. In his commentary on verse 108, Ibn Kathir explains the praised mosque as the Masjid of Quba.
A hadith also links the words about men who love to be purified to the people of Quba. Abu Hurayrah explained: “They used to cleanse themselves with water after easing” (Sunan Abi Dawud 44, graded sahih by al-Albani).
There is a second view. In Sahih Muslim 1398a, a Companion asked the Prophet ﷺ which of two mosques was founded on piety. He replied, “This is the very mosque of yours”, meaning his own mosque in Madinah.
So the hadith describe both mosques as founded on piety, and both are honoured in the Sunnah. If you want to study how scholars read the verse, ask a qualified teacher.

The reward of praying in Masjid Quba
The Prophet ﷺ said that whoever purifies himself at home, then comes to Quba and offers a prayer there, will have a reward like that of an Umrah. The hadith is in Sunan Ibn Majah 1412, and Darussalam grades it hasan, which means good.
مَنْ تَطَهَّرَ فِي بَيْتِهِ، ثُمَّ أَتَى مَسْجِدَ قُبَاءٍ، فَصَلَّى فِيهِ صَلاَةً، كَانَ لَهُ كَأَجْرِ عُمْرَةٍ
Man tatahhara fi baytihi, thumma ata masjida Quba’in, fa-salla fihi salatan, kana lahu ka-ajri ‘umrah.
“Whoever purifies himself in his house, then comes to the Quba’ Mosque and offers one prayer therein, will have a reward like that for ‘Umrah.”
Reference: Sunan Ibn Majah 1412, graded hasan (Darussalam)
The same promise appears in Sunan an-Nasa’i 699 and Jami` at-Tirmidhi 324, both graded hasan by Darussalam. At-Tirmidhi’s version is the shortest: “The Salat in Masjid Quba is like Umrah.”
Three points help you act on this hadith:
- Purify yourself before you leave. The hadith mentions purifying yourself at home. If you are staying in a hotel, make wudu there before you set off.
- Pray there. The hadith speaks of offering a prayer in the mosque. The Prophet ﷺ used to pray two rak’ahs when he visited (Sahih al-Bukhari 1194).
- Keep it in proportion. The reward is like that of an Umrah, but the visit is not an Umrah. It does not replace the rites of Umrah or Hajj.
Go with a sincere intention, and give yourself time to pray without rushing. A calm visit leaves room for your own dua as well.
Why pilgrims visit Quba on Saturdays
The Prophet ﷺ used to visit Quba every Saturday, sometimes walking and sometimes riding, as his Companion Abdullah ibn Umar reported. Ibn Umar kept up the same habit. So many pilgrims try to go on a Saturday, although the reward hadith does not name any day.
“The Prophet (ﷺ) used to go to the Mosque of Quba every Saturday (sometimes) walking and (sometimes) riding.”
Reference: Sahih al-Bukhari 1193
Another narration mentions his visits without naming a day. It adds that he “would offer two rak`at” in the mosque (Sahih al-Bukhari 1194). So you can follow this Sunnah on any day you are in Madinah.
If you are in Madinah over a weekend, a Saturday morning visit is a lovely way to follow the Prophet’s example. Go early, because Saturday mornings can be busy for this reason.
Where is Masjid Quba? Distance from Masjid an-Nabawi
It is about 3 km south of Masjid an-Nabawi. The official walkway between the two mosques is 3 km long. Most people walk it in 40 minutes to an hour, or take a taxi, which usually takes 10 to 20 minutes.
Sources give slightly different figures, depending on how they measure. The Saudi Press Agency describes a 3 km pedestrian walkway from Masjid an-Nabawi to Quba (March 2024). Saudipedia gives the distance as about 3.5 km.
On our measurement of OpenStreetMap data, the straight-line distance between the centres of the two mosques is about 3.3 km. Quba lies almost due south, a little to the east.
A few landmarks help you find your way. Quba Avenue, the main walking route, runs between the two mosques. Near Quba, Masjid al-Jumu’ah stands about 900 metres to the north, and the historic Ghars Well about 1,500 metres to the north-east (Saudipedia).
On OpenStreetMap, the mosque’s address is Quba Road, in the Al Khatim district. If you use a map app, search for “Quba Mosque” and check that the pin is in Madinah, not at a mosque of the same name elsewhere.
How to get to Masjid Quba
You can walk the 3 km walkway from Masjid an-Nabawi, take a taxi or a ride-hailing car, or join a ziyarat tour. Walking and riding both follow the Prophet’s example. A taxi is better in the heat, with small children or if walking is hard for you.
| Option | Time from Masjid an-Nabawi | Good for |
|---|---|---|
| Walk the Quba walkway | About 40 to 60 minutes | Early mornings and evenings, and anyone who enjoys walking |
| Taxi or ride-hailing app | About 10 to 20 minutes, depending on traffic | Hot days, families with small children and anyone with limited mobility |
| Ziyarat tour | Usually a few hours, with several stops | First-time visitors who want a guide and several sites in one trip |
| Walk there, ride back | About 1 hour in total | Following the Sunnah of walking without tiring yourself out |
Walking. The walkway starts on the south side of Masjid an-Nabawi and runs to Quba. It is paved and busy, so you will rarely be alone on it.
Taxi or app. Taxis and ride-hailing cars are easy to find around Masjid an-Nabawi. Use an app that shows the price in advance, or agree the fare before you get in.
Ziyarat tour. Many hotels and local guides run morning tours that stop at Quba, Masjid al-Qiblatain and Uhud. Ask at your hotel reception, or ask the Travel to Umrah team when you book, and we can help you plan your ziyarat days.
Limited mobility. The Saudi Press Agency reports round-the-clock transport around the mosque for older and disabled visitors (March 2025). Our guide to Umrah travel tips for people with disabilities has more help.
For more on getting around the two holy cities, read our guide to transport options during Umrah.

Walking the Quba walkway
A 3 km pedestrian walkway runs along Quba Avenue, from Masjid an-Nabawi to Quba Mosque. It is wide, paved and lined with shops and cafés. Walk it in the cool early morning or after sunset, carry water and wear comfortable shoes.
The Saudi Press Agency calls the route the Quba Walking Trail. It reports that thousands of people walk it every day, past food outlets, shops and cafés (March 2025). Saudipedia describes it as a paved and accessible pathway, with facilities for people with disabilities.
The walkway is part of Madinah’s plans to make the city friendlier for people on foot. Saudipedia notes that it won an award in 2018 as the best tourist attraction site in Saudi Arabia.
Before you set off, keep these points in mind:
- Go early or late. Madinah is very hot for much of the year, so walk after sunrise or in the evening.
- Carry water. Take a refillable bottle, and a small snack for children.
- Wear good shoes. Choose shoes you can slip off easily at the mosque.
- Cross with care. Use the marked crossings where the walkway meets roads.
- Stay together. If you walk as a group, agree a meeting point at each end.
- Plan the way back. If you are tired, take a taxi back to your hotel.

Tips for your visit to Quba
Make wudu at your hotel, go early and dress modestly. Women pray in their own section of the mosque. Check the time before you pray, because a hadith names times of day when voluntary prayer should be avoided.
- Make wudu before you leave. This follows the wording of the reward hadith (Sunan Ibn Majah 1412).
- Dress modestly. Wear loose, modest clothes, as you would in any mosque.
- Women. The mosque has separate sections for women (Saudipedia). Follow the signs, and agree a meeting point with your family outside.
- Children. Keep them close in the crowds, and put a card with your phone number in their pocket.
- Shoes. Carry a small bag for your shoes, so you can leave by a different door.
- Photos. Take photos quietly, and never film people while they pray.
- Crowds. Saturday mornings and the Friday prayer can be very busy. For a calmer visit, go on a weekday morning.
A hadith names the times when voluntary prayer should be avoided. The Prophet ﷺ said: “There is no prayer after the morning prayer till the sun rises” (Sahih al-Bukhari 586). The same hadith names the time after Asr until sunset.
If you walk from Masjid an-Nabawi straight after Fajr, you may arrive around sunrise. Wait until the sun is up before you pray.
Scholars differ on whether prayers with a reason, such as greeting the mosque, may be prayed at these times. If you are unsure, ask a qualified scholar, or simply time your visit for later in the morning.
If you are travelling in the UK school holidays, remember that Madinah can be extremely hot in summer. Plan your visit for the early morning, and rest in the afternoon.
At Travel to Umrah, we suggest staying close to Masjid an-Nabawi, so early walks to Quba are easy. Compare the options in our guide to hotels near Masjid an-Nabawi.

The Quba expansion project
Saudi Arabia is carrying out the largest expansion in the mosque’s history, known as King Salman’s project. It will make the mosque and its courtyards about ten times larger, at 50,000 square metres, with room for about 66,000 worshippers. Crown Prince Mohammed bin Salman announced it on 8 April 2022.
The Saudi Press Agency called it the largest expansion since the mosque was founded in the first year of the Hijrah. In March 2025, it reported that the mosque and its courtyards were “undergoing a major expansion”.
According to Saudipedia, the plan includes shaded areas and prayer spaces in the courtyards, better services and crowd management. It also covers the development of 57 historical sites around the mosque, such as farms, gardens and wells.
Building work on this scale can change the routes and entrances around the mosque. Follow the signs and the stewards on the day, and allow extra time.

Other places to visit near Quba
Combine Quba with Masjid al-Jumu’ah, about 900 metres to the north, in the same morning. Then plan Jannat ul Baqi, Uhud and Masjid al-Qiblatain for other days, or see them together on a ziyarat tour.
| Place | Why visit | Read more |
|---|---|---|
| Masjid al-Jumu’ah | About 900 metres north of Quba. It marks the place where the Prophet ﷺ led his first Friday prayer in Madinah (Saudipedia). | Our ziyarat places guide |
| Ghars Well | A historic well about 1,500 metres north-east of Quba, restored for visitors (Saudipedia) | Ask your ziyarat guide on the day |
| Jannat ul Baqi | Madinah’s main cemetery, beside Masjid an-Nabawi, where many Companions are buried | Our Jannat ul Baqi guide |
| Uhud | The site of the Battle of Uhud and the martyrs’ graves, about 4 km north of Masjid an-Nabawi | Our guide to the Battle of Uhud |
| Masjid al-Qiblatain | The mosque linked with the change of the qiblah towards Makkah, about 3.7 km north-west of Masjid an-Nabawi | Also covered in our ziyarat places guide |
A good plan is to visit Quba and Masjid al-Jumu’ah in one morning, then return to your hotel before the midday heat. Keep al-Baqi for another morning after Fajr, when the gates usually open for men.
Uhud and Masjid al-Qiblatain lie on the other side of the city, to the north. They fit well into a separate half-day trip by taxi or on a ziyarat tour.
Frequently asked questions about Masjid Quba
Is Masjid Quba the first mosque in Islam?
Yes. The Saudi Press Agency and Saudipedia both describe it as the first mosque built in Islam.
The Prophet Muhammad ﷺ founded it in 622 CE, when he reached Quba on the Hijrah from Makkah (Sahih al-Bukhari 3906). He then rode on into Madinah and built Masjid an-Nabawi.
What is the reward for praying in Quba?
A hadith says that whoever purifies himself at home, then comes to Quba and offers a prayer there, will have a reward like that of an Umrah (Sunan Ibn Majah 1412, graded hasan by Darussalam).
Similar reports are in Sunan an-Nasa’i 699 and Jami` at-Tirmidhi 324. The visit is not an Umrah itself, and it does not replace the rites of Umrah.
How far is Quba Mosque from Masjid an-Nabawi?
About 3 to 3.5 km. The Saudi Press Agency describes a 3 km walkway between the two mosques, and Saudipedia gives about 3.5 km.
On foot, allow 40 minutes to an hour at a relaxed pace. By taxi, the trip usually takes 10 to 20 minutes, depending on traffic.
Can you walk to Quba from Masjid an-Nabawi?
Yes. A 3 km pedestrian walkway runs along Quba Avenue between the two mosques. It is paved, accessible and lined with shops and cafés.
Walk in the early morning or the evening, carry water and wear comfortable shoes. The Prophet ﷺ himself sometimes walked to Quba and sometimes rode (Sahih al-Bukhari 1193).
What is the best day to visit Masjid Quba?
Saturday, if you can. The Prophet ﷺ used to visit Quba every Saturday, walking or riding (Sahih al-Bukhari 1193).
The reward hadith does not name a day, though, so you can visit on any day. Go in the morning after sunrise, when it is cooler, and expect bigger crowds on Saturdays.
Can women pray in Quba Mosque?
Yes. The mosque has separate sections for women, according to Saudipedia, so follow the signs to the women’s area.
The reward hadith uses the general word “whoever” (Sunan Ibn Majah 1412). If you are visiting with family, agree a meeting point outside before you go in, as the men’s and women’s areas are apart.
How many rak’ahs should I pray at Quba?
The reward hadith speaks of offering “one prayer” without giving a number (Sunan Ibn Majah 1412). You can pray two rak’ahs, as the Prophet ﷺ did when he visited (Sahih al-Bukhari 1194).
You can pray more if you wish. Avoid the times when voluntary prayer should not be offered, such as after Fajr until sunrise (Sahih al-Bukhari 586).

Final thoughts on visiting Quba
Masjid Quba is where the Prophet ﷺ built the first mosque of Islam, and a prayer there carries a reward like an Umrah. Make wudu at your hotel, walk or ride the 3 km from Masjid an-Nabawi and pray two rak’ahs. If you can, go on a Saturday morning, as the Prophet ﷺ did.

When you are ready to plan your trip, compare our affordable Umrah packages, which start from £555 per person as of September 2026, with the visa included. We arrange flights from London, Manchester, Birmingham and other UK airports. Use the free quote form below, message us on WhatsApp or call +44 20 3287 2118, and the Travel to Umrah team will help you plan your days in Madinah.
Sources
We checked these sources in September 2026.
- Quran 9:108 and 9:107, Saheeh International translation, Quran.com
- Tafsir Ibn Kathir (abridged) on 9:108, Quran.com
- Sunan Ibn Majah 1412, Sunan an-Nasa’i 699 and Jami` at-Tirmidhi 324: the reward like an Umrah, graded hasan (Darussalam), Sunnah.com
- Sahih al-Bukhari 1193 and 1194: the Saturday visits and two rak’ahs, Sunnah.com
- Sahih al-Bukhari 3906 and 3932: the Prophet’s arrival at Quba on the Hijrah, Sunnah.com
- Sunan Abi Dawud 44: the people of Quba and verse 9:108, graded sahih (al-Albani), Sunnah.com
- Sahih Muslim 1398a: the mosque founded on piety, Sunnah.com
- Sahih al-Bukhari 586: times when voluntary prayer is avoided, Sunnah.com
- Saudi Press Agency: Quba Mosque, Islam’s first mosque, 8 March 2025
- Saudi Press Agency: Quba Avenue and the 3 km walkway, 26 March 2024
- Saudi Press Agency: Quba Walking Trail, 20 March 2025
- Saudipedia (Saudi Ministry of Media): Quba Mosque
- OpenStreetMap: Quba Mosque and Masjid an-Nabawi, map data © OpenStreetMap contributors