Minarets and courtyard of the Prophet's Mosque, Madinah

Masjid an-Nabawi: History, Gates and Visiting the Prophet’s Mosque

A guide to the Prophet's Mosque (Masjid an-Nabawi): its history from the Hijrah to today, the Rawdah and the Blessed Grave, its historic gates, its functions, visiting etiquette and tips for first-time visitors.

Cihat Murat Yüksel
Blog Editor · RotaNur
Published
Reading
16 min
Sections
23
Summarise with AI
Contents 23 sections
  1. What Is Masjid an-Nabawi and What Does the Name Mean?
  2. Where is the Prophet’s Mosque?
  3. What is another name for the Prophet’s Mosque?
  4. The History of the Prophet’s Mosque from the Hijrah to Today
  5. The caliphs and later periods
  6. The Ottoman and Saudi periods
  7. What Were the Functions of the Prophet’s Mosque?
  8. The Rawdah and the Blessed Grave
  9. The minbar, the mihrab and the memory of Hannanah
  10. The pillars of the Rawdah
  11. Can women enter the Rawdah?
  12. The Gates of the Prophet’s Mosque
  13. How many gates does the Prophet’s Mosque have?
  14. Historic gates
  15. Etiquette for Visiting the Prophet’s Mosque
  16. Which supplication is recited when entering the mosque?
  17. Practical Information for First-Time Visitors
  18. What are the quietest times at the Prophet’s Mosque?
  19. What should you keep in mind at the Prophet’s Mosque on a Friday?
  20. Is it important to choose a hotel close to the mosque?
  21. What to See in Madinah After the Prophet’s Mosque
  22. Visiting the Prophet’s Mosque with Peace of Mind
  23. Frequently Asked Questions

The Prophet’s Mosque (Masjid an-Nabawi) is the blessed mosque that the Prophet (peace be upon him) built together with his Companions after the Hijrah, and it is the first destination of every visitor who sets foot in Madinah. Besides being the second most virtuous mosque in Islam after Masjid al-Haram, it has also gone down in history as the centre of worship, learning and governance for the first Muslim community. In this article we have brought together, in a single guide, the story of the mosque from its first construction to the present day, the location of the Rawdah and the Blessed Grave of the Prophet, its important gates, the etiquette of the visit and practical information for first-time visitors.

What Is Masjid an-Nabawi and What Does the Name Mean?

The word “Nabawi” means “belonging to or relating to the Prophet”; Masjid an-Nabawi therefore means “the Mosque of the Prophet”. This mosque, whose foundations the Prophet (peace be upon him) laid himself, where he led the prayers for years and which today also contains his grave, holds a special place in the hearts of Muslims.

The best-known of the hadiths describing the virtue of the mosque is the following: “A prayer in this mosque of mine is better than a thousand prayers in other mosques, except Masjid al-Haram.” (al-Bukhari, Muslim). When the Prophet listed the three mosques to which one may set out on a journey for the purpose of worship, he also named his own mosque alongside Masjid al-Haram and Al-Aqsa Mosque (al-Bukhari, Muslim). If you would like to learn about Al-Aqsa Mosque, one of these three mosques, you can take a look at our Al-Aqsa Mosque visit guide.

Where is the Prophet’s Mosque?

The Prophet’s Mosque is located in the centre of the city of Madinah in Saudi Arabia. Because the historic core of the city took shape around the mosque, a large share of the hotels, markets and transport points are within walking distance of it.

What is another name for the Prophet’s Mosque?

In Turkish, the mosque is also referred to by names meaning “the Noble Mosque” (al-Masjid ash-Sharif) and “the Mosque of the Messenger” (Masjid ar-Rasul), and, when mentioned together with the Haram in Makkah, as “the Noble Haram” (al-Haram ash-Sharif). Masjid al-Haram and the Prophet’s Mosque are together called the “Haramayn” (the Two Holy Mosques).

The History of the Prophet’s Mosque from the Hijrah to Today

When the Prophet (peace be upon him) migrated from Makkah to Madinah, he bought the plot of land where his camel knelt down from its owners, two orphaned brothers, and decided to build the mosque there. The Prophet worked on the construction himself alongside his Companions. The first building was a simple space made up of mud-brick walls, pillars made from palm trunks and a roof covered with palm branches. The rooms belonging to the Prophet’s wives were also built right next to the mosque.

In the early years, the qiblah of the mosque faced Al-Aqsa Mosque. When the qiblah was turned towards the Kaaba (al-Baqarah 2:144), the orientation of the mosque changed as well. Because of the growing congregation, the mosque was enlarged over time, even during the Prophet’s lifetime.

The caliphs and later periods

The mosque was expanded during the times of Umar and Uthman; it is known that stone was used in the walls during the time of Uthman. In the comprehensive renovation carried out under the Umayyads, the area containing the rooms of the Prophet’s wives was also brought within the boundaries of the mosque, and in this way the Blessed Grave came to lie inside the mosque. The dome over the Blessed Grave was built during the Mamluk period; it is known that the dome took on its present green colour in the Ottoman period.

The Ottoman and Saudi periods

The Ottoman sultans showed special reverence for the mosque. The comprehensive reconstruction carried out under Sultan Abdulmejid largely shaped the present-day appearance of the old section of the mosque. With its domes, calligraphy panels and decoration, this section is of particular interest to visitors from Türkiye. In the Saudi period, the mosque spread over a very large area through successive expansions; giant retractable umbrellas that provide shade in the heat were installed in the courtyards, and moving domes were used in the roofs.

Period Key development
The time of the Prophet (peace be upon him) First construction from mud brick and palm trunks, creation of the Suffah, change of the qiblah
Umar and Uthman The first major expansions as the congregation grew
The Umayyads The rooms were incorporated into the mosque, placing the Blessed Grave within the mosque’s boundaries
The Mamluks Construction of the dome over the Blessed Grave
The Ottomans Reconstruction under Sultan Abdulmejid, the present colour of the Green Dome
The Saudi period Major expansions, courtyard umbrellas, modern infrastructure
Shade umbrellas opened in the courtyard of the Prophet's Mosque
Shade umbrellas opened in the courtyard of the Prophet's Mosque · Photo: Anaya Ki Family, CC BY-SA 3.0

What Were the Functions of the Prophet’s Mosque?

The Prophet’s Mosque was not only a place where prayers were performed; it was the heart of the first Islamic community in Madinah. The roles the mosque took on in the time of the Prophet (peace be upon him) show, even today, how broad the concept of a “mosque” really is.

  • A centre of worship: The five daily prayers were performed here, and the Friday and Eid sermons were delivered here.
  • A centre of learning: The Suffah, in one corner of the mosque, was the place where Companions who had devoted themselves to seeking knowledge stayed and received lessons; for this reason it is remembered as the first Islamic school.
  • Governance and consultation: Decisions concerning the community were discussed here, and the Prophet consulted his Companions here.
  • Receiving envoys: Delegations from different tribes were welcomed in the mosque, and Islam was explained to them here.
  • Justice and social solidarity: Disputes were settled here, and help was delivered from here to those in need.

This many-sided role of the mosque also opens a space for reflection for today’s visitors: while standing in the Rawdah, near the section accepted as the site of the Suffah, one can call to mind how the first generations of Islam lived knowledge and worship side by side.

The Rawdah and the Blessed Grave

In the old section of the mosque, the area lying between the Prophet’s house and his minbar is known as the Rawdah (ar-Rawdah al-Mutahharah, “the Pure Garden”). The Prophet (peace be upon him) said of this area: “What is between my house and my minbar is one of the gardens of Paradise.” (al-Bukhari, Muslim). The Rawdah is distinguished from the rest of the mosque by the differently coloured carpets on its floor.

Immediately to the east of the Rawdah lies the Blessed Grave, where the Prophet (peace be upon him) is buried. Abu Bakr and Umar are also buried here, beside the Prophet. The Blessed Grave is inside a section surrounded by grilles, and visitors offer their greetings as they pass in front of it.

The minbar, the mihrab and the memory of Hannanah

Before the minbar was built, the Prophet (peace be upon him) used to deliver his sermons leaning against a palm trunk. According to the account of Jabir ibn Abdullah, when the minbar was made and the Prophet ascended it for the sermon, a moaning sound was heard from the palm trunk he used to lean on; the Prophet came over to it and calmed it by placing his hand on it (al-Bukhari). The Hannanah (“the one who moaned”) pillar in the Rawdah takes its name from this memory. The minbar and mihrab seen in the Rawdah today are structures that were renewed in later periods; however, the place where they stand carries the memory of the Prophet’s time.

The pillars of the Rawdah

Some of the pillars in the Rawdah are known by special names that refer to events in the Prophet’s biography (sirah). The best known among them include the pillars of Hannanah, Aisha, Tawbah (Abu Lubabah), Wufud, Sarir and Haras. The pillars carry plaques showing their names; when you tour them with a guide, listening to the story of each one makes the visit more meaningful.

Can women enter the Rawdah?

Yes, women visitors can also pray in the Rawdah; however, separate entry points and different time slots apply for women and men. Visits to the Rawdah are currently organised through a permit obtained via the Nusuk app. Because the rules on the permit system, time slots and frequency of visits change from time to time, confirm the current practice with official sources and your guide before you travel. For the greetings and supplications that can be recited in the Rawdah and in front of the Blessed Grave, see our article on the Rawdah visit supplication.

The Gates of the Prophet’s Mosque

With its expansions, the mosque has gained a large number of gates. The gates are marked with both a name and a number; for new visitors, using the gate number is the most practical way to set a meeting point.

How many gates does the Prophet’s Mosque have?

The number of gates has changed with every expansion, and there are many side entrances in addition to the main gates. For this reason, rather than memorising a single number, it is more useful to learn the name and number of the gate closest to your hotel.

Historic gates

Some of the gates in the old section are known by their historic names and are points that visitors use often:

  • Bab as-Salam: Located on the western side of the mosque; it is known that those who wish to visit the Blessed Grave usually enter from this direction.
  • Bab ar-Rahmah: Another of the historic gates on the western facade.
  • Bab Jibril: On the eastern side; it takes its name from the Angel Jibril (Gabriel).
  • Bab an-Nisa: As its name (“the Gate of the Women”) suggests, this gate on the eastern facade is the historic gate associated with women.
  • Bab Abi Bakr: It is named after the door of Abu Bakr’s house that opened onto the mosque.

Which gate the greeting route starts from and which gate it exits through is arranged by the staff according to crowd management. When you first enter the mosque, it is enough to follow the signs and the directions of the staff.

Minarets and clock tower of the Prophet's Mosque in Madinah
Minarets and clock tower of the Prophet's Mosque in Madinah · Photo: CR Guru PK, CC BY-SA 4.0

Etiquette for Visiting the Prophet’s Mosque

The visit to Madinah is not part of Umrah; however, praying in the Prophet’s mosque and offering greetings at the Blessed Grave is a virtuous visit that every Muslim who comes to Madinah longs for from the heart. To make sure the visit is carried out with proper manners, keep the following points in mind:

  1. Go to the mosque in clean, neat clothing and in a state of wudu; enter with your right foot and recite the supplication for entering the mosque.
  2. If possible, first pray two rak’ahs of tahiyyat al-masjid (the prayer greeting the mosque).
  3. When you reach the Blessed Grave, offer your greeting in a low voice by saying “Esselâmü aleyke yâ Rasûlallah” (Peace be upon you, O Messenger of Allah); then offer your greetings to Abu Bakr and to Umar.
  4. After the greeting, keep moving without stopping; make room for those coming behind you, and if you wish to make supplication, do so in a suitable part of the mosque while facing the qiblah.
  5. Avoid practices that have no place in the religion, such as rubbing your hands or face on the grilles and walls.

The Holy Quran commands the believers not to raise their voices in the presence of the Prophet (al-Hujurat 49:2). This etiquette is also observed in front of the Blessed Grave.

Which supplication is recited when entering the mosque?

There is no obligatory supplication to be recited when entering the mosque; a person may also pray in their own language. The short supplication that the Prophet (peace be upon him) recommended reciting when entering the mosque is as follows (Muslim):

Transliteration: Allâhümme’ftah lî ebvâbe rahmetik.

Meaning: O Allah, open for me the gates of Your mercy.

In the same hadith, it is recommended that when leaving the mosque one says “Allâhümme innî es’elüke min fadlik”, meaning “O Allah, I ask You of Your bounty”. Memorising these short supplications makes it easier to enter and leave both the Prophet’s Mosque and Masjid al-Haram each time with an awareness of worship.

Important: Praying forty prayers in the Prophet’s Mosque is not a condition of Umrah or Hajj. If your programme allows, continuing to attend the congregational prayers is a fine effort; however, if your time is short, do not treat it as an obligation. For a detailed assessment of the subject, you can refer to the current fatwas of Diyanet (Türkiye’s Presidency of Religious Affairs).

Practical Information for First-Time Visitors

The Prophet’s Mosque becomes very crowded, especially on Fridays, during the month of Ramadan and in the weeks close to the Hajj season. Setting out early before the prayers makes it easier both to find a place and to worship in peace.

What are the quietest times at the Prophet’s Mosque?

In general, the hours after the Fajr prayer and late at night are relatively calmer. Because the courtyards can be hot between the Dhuhr and Asr prayers, it is more comfortable to spend that time in the covered sections. As crowd levels vary from season to season, take your guide’s recommendations into account.

What should you keep in mind at the Prophet’s Mosque on a Friday?

On Fridays, the mosque fills with the people of Madinah as well as the visitors staying in the city. Setting off early for the Friday prayer, performing your wudu at the hotel and taking water and a small prayer mat with you will make things easier. As the gates become crowded after the prayer, it is safer not to rush on the way out and to wait for the crowd to disperse.

Is it important to choose a hotel close to the mosque?

Yes, staying at a hotel close to the mosque makes it easier to reach all five daily prayers and conserves the energy of elderly visitors in particular. You can browse the accommodation options on our Madinah hotels page.

  • Note the name and number of the gate closest to your hotel on your phone.
  • Keep a small cloth bag with you to carry your shoes.
  • Set a fixed meeting point with your group based on a gate number.
  • In the hot months, carry water and a light umbrella with you.

What to See in Madinah After the Prophet’s Mosque

Immediately to the east of the Prophet’s Mosque lies Jannat al-Baqi, the historic cemetery of Madinah; to learn about the Companions buried there and the practices for visiting it, you can read our Jannat al-Baqi guide. Quba Mosque, known as the first mosque of Islam, and Mount Uhud, the scene of one of the most important events of the Prophet’s biography, are usually visited as part of the same programme. For a complete list of all the blessed sites in Madinah, take a look at our article on places to visit in Madinah.

Visiting the Prophet’s Mosque with Peace of Mind

Visiting the Prophet’s Mosque means witnessing up close the last ten years of the life of the Prophet (peace be upon him), the first Islamic community in Madinah and the values that shaped that community. Learning in advance about the history of the mosque, the location of the Rawdah and the etiquette of the visit makes every moment you spend there more conscious and more peaceful.

At RotaNur, our Umrah tours that include Madinah offer accommodation close to the mosque and guided visits around the city. For any questions you may have, you can reach us through our contact page or our WhatsApp line. May Allah grant us all the opportunity to visit the Prophet’s mosque.

Frequently Asked Questions

How do you book an appointment to visit the Rawdah?

Appointments for visiting the Rawdah are made through the Nusuk app. After creating an account in the app, you choose a suitable date and time for the Rawdah; time slots are arranged separately for women and men. Because limits may be placed on how often appointments can be booked, it is helpful to plan your first appointment at the start of your Madinah programme. As the way the app works may change, confirm the current conditions with official sources and your guide before you travel.

What lies beneath the Green Dome?

The Green Dome stands over the Blessed Grave, where the Prophet (peace be upon him) is buried. Abu Bakr and Umar are also buried in this section, beside the Prophet. The dome over the Blessed Grave was built during the Mamluk period and took on its present green colour in the Ottoman period. Visible from the mosque’s courtyard and from many other points, this dome has become the best-known symbol of Madinah.

Who were the People of the Suffah (Ashab as-Suffah)?

The People of the Suffah were the Companions who, in the time of the Prophet (peace be upon him), stayed in the shaded section called the Suffah in one corner of the Prophet’s Mosque and devoted themselves to seeking knowledge. These Companions, most of whom were poor or had no family in Madinah, received lessons directly from the Prophet and passed on what they learned to others. Abu Hurairah, known for his narration of hadith, is also counted among the People of the Suffah. For this reason, the Suffah is remembered as the first Islamic school.

Does everyone who goes for Umrah need to visit Madinah?

No, the visit to Madinah is not part of Umrah; Umrah is completed in Makkah with ihram, tawaf, sa’i and shaving or trimming the hair (halq/taqsir). Nevertheless, because praying in the Prophet’s Mosque and offering greetings at the Blessed Grave are regarded as a virtuous visit, Umrah programmes usually include Madinah as well. You can find all the steps of Umrah in detail in our how to perform Umrah guide.

How do you get from Makkah to the Prophet’s Mosque?

The most common ways to travel from Makkah to Madinah are the Haramain High-Speed Railway and a coach journey by road. The high-speed train connects the two cities via Jeddah; since the station in Madinah is not within walking distance of the Prophet’s Mosque, you transfer from the station to your hotel by vehicle. In group programmes, this transport is usually planned as part of the tour. To compare the options, take a look at our Umrah tours page.

Published: 16 Sep 2026
Cihat Murat Yüksel
Author Blog Editor · RotaNur

Cihat Murat Yüksel is the editor of the RotaNur blog and the founder of Markention. Drawing on the sources of Türkiye's Presidency of Religious Affairs (Diyanet), he turns the questions travellers ask most about preparing for Umrah, Hajj and halal travel into clear, practical guides.

Questions answered in this article

What Is Masjid an-Nabawi and What Does the Name Mean?

The word “Nabawi” means “belonging to or relating to the Prophet”; Masjid an-Nabawi therefore means “the Mosque of the Prophet”. This mosque, whose foundations the Prophet (peace be upon him) laid himself, where he led the prayers for years and which today also contains his grave, holds a special place in the hearts of Muslims.

Where is the Prophet’s Mosque?

The Prophet’s Mosque is located in the centre of the city of Madinah in Saudi Arabia. Because the historic core of the city took shape around the mosque, a large share of the hotels, markets and transport points are within walking distance of it.

What is another name for the Prophet’s Mosque?

In Turkish, the mosque is also referred to by names meaning “the Noble Mosque” (al-Masjid ash-Sharif) and “the Mosque of the Messenger” (Masjid ar-Rasul), and, when mentioned together with the Haram in Makkah, as “the Noble Haram” (al-Haram ash-Sharif). Masjid al-Haram and the Prophet’s Mosque are together called the “Haramayn” (the Two Holy Mosques).

What Were the Functions of the Prophet’s Mosque?

The Prophet’s Mosque was not only a place where prayers were performed; it was the heart of the first Islamic community in Madinah. The roles the mosque took on in the time of the Prophet (peace be upon him) show, even today, how broad the concept of a “mosque” really is.

Can women enter the Rawdah?

Yes, women visitors can also pray in the Rawdah; however, separate entry points and different time slots apply for women and men. Visits to the Rawdah are currently organised through a permit obtained via the Nusuk app. Because the rules on the permit system, time slots and frequency of visits change from time to time, confirm the current practice with official sources and your guide before you travel. For the greetings and supplications that can be recited in the Rawdah and in front of the Blessed Grave, see our article on the Rawdah visit supplication.

How many gates does the Prophet’s Mosque have?

The number of gates has changed with every expansion, and there are many side entrances in addition to the main gates. For this reason, rather than memorising a single number, it is more useful to learn the name and number of the gate closest to your hotel.

Programmes related to this guide

Our selected Umrah Tours for those who want to experience what this article describes. Services included in the price are shown on each card.

All Umrah Tours

Keep reading

Complete your preparation with other guides on the same topic.

All posts