Contents 26 sections
- Where Is Quba Mosque?
- What is Quba Mosque?
- The Story of Quba Mosque: The First Stop of the Hijrah
- The Hijrah and the Hijri calendar
- Who built Quba Mosque?
- What was Quba Mosque like originally?
- Quba Mosque and the Holy Quran
- Is there a verse about Quba Mosque?
- How did the news of the change of qiblah reach Quba?
- Why is Masjid al-Dirar held up as an example?
- The Significance and Virtue of Quba Mosque
- What is the Quba Mosque hadith?
- How to Visit Quba Mosque
- How do you get to Quba Mosque?
- Do you have to go to Quba Mosque on a Saturday?
- Can women visit Quba Mosque?
- Mosques to See Together with Quba in Madinah
- What is the present building of Quba Mosque like?
- Practical Tips for Your Visit
- Common Questions About Quba Mosque
- Why is Quba Mosque important?
- Is a visit to Quba included in Umrah tour programmes?
- How many rak’ahs are prayed at Quba Mosque?
- What is the difference between Quba Mosque and the Prophet’s Mosque?
- The Legacy of the First Mosque
- Frequently Asked Questions
Quba Mosque is the blessed building whose foundations were laid at the last stop on the Hijrah journey before Madinah, during the days when the Prophet (peace be upon him) stayed at Quba; for this reason it is known as the first mosque in Islam. In this article, you will find detailed information on where Quba Mosque is, who built it and how, the verse of the Quran accepted as referring to it, the hadiths that describe its virtue, and practical information that will be useful when you visit it today.
Where Is Quba Mosque?
Quba Mosque is located in the south of Madinah, in the Quba area, which has now become one of the city’s neighbourhoods. In the time of the Prophet (peace be upon him), Quba was a settlement separate from the centre of Madinah, surrounded by date palm groves, and it was known as the home of the Banu Amr ibn Awf, a clan of the Aws tribe.
Today, Quba can be reached quickly by vehicle from the Prophet’s Mosque (Masjid an-Nabawi). As the avenue connecting the two mosques has been laid out to suit pedestrians, those whose health allows can also cover the distance on foot. In the hot months, the walk should be saved for the early hours of the morning.
What is Quba Mosque?
Quba Mosque is the mosque that the Prophet (peace be upon him) built together with his Companions when he reached Quba during the Hijrah. As the first mosque built for Muslims to worship together and openly, it holds a special place in Islamic history.
The Story of Quba Mosque: The First Stop of the Hijrah
After setting out from Makkah with Abu Bakr and hiding for a time in the Cave of Thawr, the Prophet (peace be upon him) made his way towards Madinah. Once the Muslims of Madinah heard the news that he was coming, they would go out of the city every morning to watch for his arrival. Before entering Madinah, the Prophet stopped at Quba and stayed there for a while as a guest among the Banu Amr ibn Awf.
During the days he stayed at Quba, the foundations of the mosque were laid. The Prophet worked on the construction himself; he carried stones and encouraged his Companions in this work. It is also known that Ali, after returning the items entrusted to the Prophet in Makkah to their owners, caught up with him at Quba. After leaving Quba, as he made his way towards Madinah, the Prophet led the first Friday prayer in the territory of the Banu Salim; today Masjid al-Jumu’ah (the Friday Mosque) stands at this spot.
The Hijrah and the Hijri calendar
This new era, which began at Quba, became a historic turning point for Muslims. During the caliphate of Umar, when Muslims came to need a common calendar, a consultation was held and the event of the Hijrah was accepted as the starting point of the calendar. The Hijri calendar used today is the result of this decision. For this reason, someone who visits Quba Mosque visits not only the first mosque but also the memory of the starting point of the calendar by which the Muslim community (ummah) measures its time.
Who built Quba Mosque?
The foundations of Quba Mosque were laid by the Prophet (peace be upon him) during the Hijrah, and it was built together with his Companions. It is known that the people of Quba also took part in the construction. In the centuries that followed, the mosque was renovated and expanded in different periods; the present building is the result of these renovations.
What was Quba Mosque like originally?
The first building was a plain, unpretentious place, built with simple materials in keeping with the architecture of Madinah at the time. In the early years, Muslims prayed facing towards Al-Aqsa Mosque, so the qiblah of the mosque was also in that direction; after the qiblah was changed to the Kaaba, the orientation of the mosque changed accordingly.

Quba Mosque and the Holy Quran
Surah at-Tawbah mentions Masjid al-Dirar, which the hypocrites built in order to sow division among the Muslims, and the Prophet (peace be upon him) is commanded not to pray there (at-Tawbah 9:107). The verse that immediately follows says: “A mosque founded on piety (taqwa) from the first day is more worthy of your standing in prayer there. In it are men who love to purify themselves, and Allah loves those who purify themselves.” (at-Tawbah 9:108).
Is there a verse about Quba Mosque?
A significant number of Quranic commentators explain the phrase “a mosque founded on piety from the first day” in verse 108 of Surah at-Tawbah as referring to Quba Mosque. There are also scholars who say that this phrase refers to the Prophet’s Mosque, while many commentators state that the verse may cover both mosques. The commentaries also associate the phrase “men who love to purify themselves” in the verse with the people of Quba.
How did the news of the change of qiblah reach Quba?
According to the account of Abdullah ibn Umar, while the congregation at Quba was performing the Fajr prayer, someone came and told them that a verse had been revealed to the Prophet (peace be upon him) commanding that the qiblah be turned towards the Kaaba. Upon this, the congregation turned their faces towards the Kaaba in the middle of the prayer (Bukhari, Muslim). This event is related as a fine example of the Companions’ devotion to the revelation. Masjid al-Qiblatayn, known as another place where the change of qiblah took place during the prayer, is also among the historic mosques of Madinah.
Why is Masjid al-Dirar held up as an example?
Although Masjid al-Dirar looked like a mosque from the outside, it had been built to harm the Muslims and sow division among them. By comparing this building with the mosque founded on piety, the Holy Quran reminds us that the worth of a building is measured by the intention with which it was founded. The relevant verses of Surah at-Tawbah explain that a building whose foundation rests on reverence for Allah and His good pleasure is better than a building founded on the edge of a crumbling cliff (at-Tawbah 9:109). This comparison gives those who visit Quba Mosque an opportunity to reflect on the sincerity of their intention.
The Significance and Virtue of Quba Mosque
The significance of Quba Mosque stems both from its being the first mosque in Islam and from the constant attention the Prophet (peace be upon him) showed it. Two narrations in the hadith sources stand out as reflecting this attention.
What is the Quba Mosque hadith?
It is reported that the Prophet (peace be upon him) said: “Prayer in Quba Mosque is like an Umrah.” (Tirmidhi, Ibn Majah). In the narration of Ibn Majah, it is stated that a person who purifies himself at home and then comes to Quba Mosque and prays there will be given a reward like the reward of an Umrah. This hadith describes the virtue of prayer performed at Quba; it does not mean that a visit to Quba replaces Umrah or counts in place of Umrah.
Another narration from Abdullah ibn Umar reports that every Saturday the Prophet (peace be upon him) would go to Quba Mosque, on foot or riding, and pray two rak’ahs there (Bukhari, Muslim).
The Prophet’s attachment to Quba is also seen as a reflection of his loyalty to the people of Quba, who had embraced him during the days of the Hijrah. The fact that he did not forget this first stop even after settling in Madinah teaches his community to be loyal both to places and to people. It is known that the Companions also continued this Sunnah and valued visiting Quba. The interest that visitors to Madinah show in Quba today is a continuation of this deep-rooted tradition.
Important: The virtue of praying at Quba does not take the place of the act of worship of Umrah. Umrah is a separate act of worship, performed with ihram, tawaf, sa’i and shaving or trimming the hair (halq/taqsir). A visit to Quba, on the other hand, is regarded as a beautiful Sunnah in Madinah. We have explained the order and conditions of Umrah in detail in our guide on how to perform Umrah. For detailed questions about virtues, you can consult the current fatwas of Diyanet (Türkiye’s Presidency of Religious Affairs).
How to Visit Quba Mosque
A visit to Quba is one of the easiest stops to plan and one of the most peaceful in a Madinah programme. Taking the hadith’s words “purifying oneself at home and then coming” as a guide, it is good etiquette to set out for the visit with wudu.
- Perform wudu where you are staying and put on clean clothes that comply with Islamic dress.
- If possible, choose a Saturday; however, there is nothing wrong at all with going on another day.
- Enter the mosque with your right foot and recite the supplication for entering a mosque.
- If it is not a disliked (makruh) prayer time, perform two rak’ahs of prayer.
- After the prayer, make supplication as you wish; you can then move on to nearby places such as Masjid al-Jumu’ah.
How do you get to Quba Mosque?
You can get to Quba from the area around the Prophet’s Mosque by taxi, in the vehicles of guided city tours or, if your health allows, on foot. Those who prefer to walk are advised to set off before sunrise or just after it, to take water with them and to plan to use a vehicle for the return journey. For those travelling as a group, a guided tour is the most comfortable option, both for transport and for hearing the story of the mosque on the spot.
Do you have to go to Quba Mosque on a Saturday?
No, it is not a requirement. The Prophet’s (peace be upon him) going to Quba on Saturdays is remembered as a Sunnah; if your programme allows, it is good to schedule your visit for this day. The hadith describing the virtue of prayer at Quba, however, does not make any particular day a condition.
Can women visit Quba Mosque?
Yes, Quba Mosque has prayer sections and entrances set aside for women. As the locations of the sections and their opening hours can change according to the arrangements in place, follow the directions of the staff when you arrive at the mosque.
Mosques to See Together with Quba in Madinah
The visit to Quba is usually made as part of a guided city tour and combined with other historic sites in the surrounding area. The table below summarises these mosques and their key features.
| Mosque | Key feature | Connection with Quba |
|---|---|---|
| Quba Mosque | The first mosque in Islam | The first stop of the Hijrah |
| Masjid al-Jumu’ah | Known as the place where the first Friday prayer was performed | On the road from Quba to Madinah |
| Masjid al-Qiblatayn | Known as the place where the qiblah was changed during the prayer | Shares the memory of the change of qiblah |
| The Prophet’s Mosque | The second mosque built by the Prophet (peace be upon him) | Mentioned together with Quba in commentaries on at-Tawbah 9:108 |
On the day you visit Quba, you may also want to stop at Uhud and the martyrs’ cemetery in the north of the city; for this area, you can read our guide to Mount Uhud. We have described the mosque at the centre of Madinah in detail in our article on the Prophet’s Mosque (Masjid an-Nabawi). For a complete list of the sites in the city, take a look at our article on places to visit in Madinah.
What is the present building of Quba Mosque like?
Today’s Quba Mosque is a modern building with white facades, domes and minarets. Renovated many times throughout history, the mosque took on its present appearance with a comprehensive rebuilding carried out in recent times. With its courtyard, ablution areas and sections set aside for women, it has been arranged to welcome large numbers of visitors. As expansion and landscaping works may be carried out around the mosque from time to time, the entry points may change.

Practical Tips for Your Visit
Quba Mosque gets busy, especially on Saturday mornings and during holiday periods. To avoid being affected by the crowds, it is more comfortable to plan your visit in the time between prayers rather than just before a prayer time.
- Set off after the Fajr prayer to make the most of both the cool air and the relatively quiet hours.
- Carry a small bag for your shoes; the shelves at the entrances may be full.
- Do not spend too much time shopping at the date and souvenir sellers around the mosque and cut into your time for worship.
- To avoid getting separated from your group, be clear about where your vehicle is parked and the meeting time.
- Avoid rubbing your hands and face on the walls, pillars and doors of the mosque with the intention of seeking blessings (tabarruk).
Common Questions About Quba Mosque
Why is Quba Mosque important?
Quba Mosque is important because it is the first mosque in Islam, because its foundations were laid by the Prophet (peace be upon him), because it is associated with the verse in Surah at-Tawbah, and because of the hadiths describing the virtue of prayer performed there. The Prophet’s regular visits to this mosque are also the clearest sign of the attention he gave it.
Is a visit to Quba included in Umrah tour programmes?
In most Umrah programmes that include Madinah, Quba Mosque is one of the first stops on the guided city tour. You can find out from your travel agency which day and time the visit falls on in your programme, and state your preference for a Saturday in advance.
How many rak’ahs are prayed at Quba Mosque?
The hadiths report that the Prophet (peace be upon him) prayed two rak’ahs when he went to Quba. For this reason, visitors usually perform two rak’ahs of prayer when they enter the mosque. If it is not a disliked (makruh) prayer time, those who wish may also perform more voluntary (nafl) prayers; if the visit coincides with the time of an obligatory (fard) prayer, praying with the congregation is also a means of benefiting from the virtue of the mosque.
What is the difference between Quba Mosque and the Prophet’s Mosque?
Quba Mosque is the first mosque, built at Quba during the Hijrah before the arrival in Madinah. The Prophet’s Mosque, on the other hand, is the mosque that the Prophet (peace be upon him) built after settling in Madinah, and it is where his grave is located today. The hadiths about the virtue of prayer at the Prophet’s Mosque are separate, and this mosque is one of the three mosques to which people travel for worship.
The Legacy of the First Mosque
Quba Mosque reminds us that the first thing a community did, even before it had found its home, was to build a place of worship. Although this small mosque founded on piety has been renovated over the centuries, it has never lost its meaning. The two rak’ahs of prayer performed at Quba are a unique occasion to reflect on the journey of the Hijrah and the brotherhood that journey brought about.
At RotaNur, in our Madinah programmes, we take care to schedule the visit to Quba Mosque for a Saturday morning wherever possible. You can explore our Umrah tours options and reach us through our contact page with any questions. May Allah accept your prayers.
Frequently Asked Questions
Is the Friday prayer held at Quba Mosque?
Yes, the Friday prayer is held at Quba Mosque, and on Fridays the mosque becomes very crowded with local people and visitors. Those who wish to pray the Friday prayer here are advised to go early and to plan their transport back in advance. That said, many visitors in Madinah prefer to pray the Friday prayer at the Prophet’s Mosque (Masjid an-Nabawi) and leave their visit to Quba for Saturday, in keeping with the Sunnah.
When should those who go to Quba early in the morning pray?
According to the Hanafi school, once the obligatory (fard) part of the Fajr prayer has been performed, no voluntary prayers are performed until the sun has risen and the disliked (makruh) time has passed. For this reason, those who go to Quba straight after the Fajr prayer can spend their time in the mosque in supplication and remembrance of Allah (dhikr), and perform their two rak’ahs once the disliked time has passed. Checking the time of sunrise on a reliable prayer times app makes it easier to plan your visit around this time.
Which supplication is recited when entering Quba Mosque?
There is no special supplication for Quba Mosque reported in the authentic sources; as with other mosques, it is sufficient to enter with your right foot, recite the supplication for entering a mosque and send blessings on the Prophet (salawat). After the prayer, you can make supplication in your own language, as it comes from your heart. For the places and times in Makkah and Madinah where supplications are hoped to be accepted, take a look at our article on places where supplications are accepted.
How long does a visit to Quba Mosque take?
Excluding travel, a visit to Quba Mosque is usually short; for most visitors, between half an hour and an hour is enough to enter the mosque, perform two rak’ahs of prayer and make supplication. On Saturday mornings, during holiday periods and at times close to the prayer times, this can take longer because of the crowds. Guided city tours that combine Quba with stops such as Masjid al-Jumu’ah and Masjid al-Qiblatayn, on the other hand, usually take up half a day.
Is it permitted to take photographs at Quba Mosque?
It is usually possible to take souvenir photographs outside Quba Mosque and in its courtyard; inside the mosque, however, you should avoid filming or photographing the congregation and the imam, especially during prayer. As the rules of the Saudi authorities on filming in mosques may change, follow the warnings of the staff. Remembering that the main purpose of the visit is worship, focusing on prayer and supplication rather than spending time on your phone is the finest way to give this blessed place its due.
Questions answered in this article
Where Is Quba Mosque?
Quba Mosque is located in the south of Madinah, in the Quba area, which has now become one of the city’s neighbourhoods. In the time of the Prophet (peace be upon him), Quba was a settlement separate from the centre of Madinah, surrounded by date palm groves, and it was known as the home of the Banu Amr ibn Awf, a clan of the Aws tribe.
What is Quba Mosque?
Quba Mosque is the mosque that the Prophet (peace be upon him) built together with his Companions when he reached Quba during the Hijrah. As the first mosque built for Muslims to worship together and openly, it holds a special place in Islamic history.
Who built Quba Mosque?
The foundations of Quba Mosque were laid by the Prophet (peace be upon him) during the Hijrah, and it was built together with his Companions. It is known that the people of Quba also took part in the construction. In the centuries that followed, the mosque was renovated and expanded in different periods; the present building is the result of these renovations.
What was Quba Mosque like originally?
The first building was a plain, unpretentious place, built with simple materials in keeping with the architecture of Madinah at the time. In the early years, Muslims prayed facing towards Al-Aqsa Mosque, so the qiblah of the mosque was also in that direction; after the qiblah was changed to the Kaaba, the orientation of the mosque changed accordingly.
Is there a verse about Quba Mosque?
A significant number of Quranic commentators explain the phrase “a mosque founded on piety from the first day” in verse 108 of Surah at-Tawbah as referring to Quba Mosque. There are also scholars who say that this phrase refers to the Prophet’s Mosque, while many commentators state that the verse may cover both mosques. The commentaries also associate the phrase “men who love to purify themselves” in the verse with the people of Quba.
How did the news of the change of qiblah reach Quba?
According to the account of Abdullah ibn Umar, while the congregation at Quba was performing the Fajr prayer, someone came and told them that a verse had been revealed to the Prophet (peace be upon him) commanding that the qiblah be turned towards the Kaaba. Upon this, the congregation turned their faces towards the Kaaba in the middle of the prayer (Bukhari, Muslim). This event is related as a fine example of the Companions’ devotion to the revelation. Masjid al-Qiblatayn, known as another place where the change of qiblah took place during the prayer, is also among the historic mosques of Madinah.

















