The mosque has 42 gates. You will arrive through one of them, take your shoes off, pray, and then discover that every direction looks identical and you have no idea which number you came in by.
This is the gate map, with the numbers, so you can note yours on the way in and find it again on the way out. It also covers which gates matter for the Rawdah, which side the women’s area is on, and why the numbering jumps.
How many gates does Masjid Nabawi have?
Forty two gates give access to the roofed complex of the mosque, according to the Madain Project’s survey of the gates. That count is for the inner building. The courtyards around it sit inside a separate low perimeter wall with its own openings, which is part of why people quote different totals.
The numbering runs anticlockwise from Bab as-Salam in the south west, up the western side, across the north, and down the eastern side to the Rawdah corner.
The original mosque in the Prophet’s ﷺ time had three entrances, not forty two: Bab ul-Rahmah on the south, Bab Jibreel on the west and Bab un-Nisa on the east, although they did not carry those names then.
The full gate list, by number
| Gate number | Name | Side |
|---|---|---|
| 1 | Bab as-Salam | South west |
| 2 | Bab Abu Bakr | West |
| 3 | Bab al-Rahmah | West |
| 4 | Bab al-Hijrah | West |
| 5 | Bab Quba | West |
| 7, 8, 9 | Bab Malik al-Saud | West |
| 10 | Bab Imam Bukhari | West |
| 11 | Bab al-Aqeeq | North west |
| 12, 13, 14 | Bab al-Majeedi | North |
| 16, 17, 18 | Bab Umar ibn al-Khattab | North |
| 19 | Bab Badr | North |
| 20, 21, 22 | Bab Malik al-Fahd | North |
| 23 | Bab Ohad | North |
| 24, 25, 26 | Bab Uthman ibn Affan | North east |
| 28, 29, 30 | Bab Ali ibn Abi Talib | East |
| 31 | Bab Abu Zar Ghaffari | East |
| 32 | Bab Imam Muslim | East |
| 33, 34, 35 | Bab Malik Abdulaziz | East |
| 37 | Bab Makkah | East |
| 38 | Bab Bilal | East |
| 39 | Bab an-Nisa | East |
| 40 | Bab Jibreel | East, near the Prophet’s chamber |
| 41 | Bab al-Baqi | East, toward Jannat al-Baqi |
| 42 | Bab ul-Aimah | South |
Two things to notice. The big gates have three numbers, because they are gate complexes with three separate doorways, which is why the sequence skips. And Bab Jibreel is Gate 40. You will see it listed as 44 on some maps and in some AI answers. Forty is the number documented in the survey above.
Which gate do you use for the Rawdah?
The Rawdah sits at the south eastern corner, between the Prophet’s ﷺ chamber and his minbar, so the gates that matter are the high numbers.
Bab Jibreel (40) and Bab al-Baqi (41) are the closest approaches on the eastern side. Bab ul-Aimah (42), the Gate of the Imams, is a small southern gate that opens directly into the Rawdah section. It is also known as Bab ul-Janayez, the gate of funerals, and is used mainly by the imams.
In practice you do not choose your own route. Rawdah entry runs on timed permits through the Nusuk app, and the permit sends you to a marshalled assembly point rather than a gate of your choosing. We have written separately on how the Rawdah permit works and how to book a slot.
What the numbers are genuinely useful for is afterwards, when you come out somewhere unfamiliar and need to work out which side of a very large building you are standing on.
Which gates are for women?
Bab an-Nisa is Gate 39, on the eastern side, and the name means the gate of women. It is the historic women’s entrance and the one most often given in directions.
In current practice the women’s prayer areas and their entrances are marshalled and can change by season and by crowd level, particularly in Ramadan. Treat Gate 39 as the anchor and follow the stewards on the day rather than assuming last year’s arrangement still holds.
Bab as-Salam, Gate 1, is the traditional entry for giving salam to the Prophet ﷺ and is the first major historic entrance.
The gate you will actually arrive at
If you are staying in the northern hotel strip, which most package pilgrims are, you will come in through Bab Malik al-Fahd, Gates 20, 21 and 22, the large northern complex facing the hotels and commercial area.
Note that. Not “the big one at the front”, because every side has a big one at the front. The number.
The doors themselves are worth looking at
Most people walk through without looking up, which is a shame, because the doors are extraordinary pieces of work.
Above each one is a stone plaque carrying the same verse: ادْخُلُوهَا بِسَلَامٍ آمِنِينَ, udkhuluhā bisalāmin āminīna, “Enter it in peace, secure”, from Surah al-Hijr, 15:46.
Each door panel was built from roughly 1,600 pieces of teak joined into brass frames. The brass is plated in 23 carat gold and polished. Each door weighs about 2,500 kilograms, and they are hung precisely enough to open without effort. The project used more wood than any comparable one at the time.
How not to lose your bearings
Four habits that save a lot of walking.
Photograph your gate number on the way in. Not the name, the number. The sign is large and well lit and the photograph is timestamped, which also tells you how long you have been inside.
Note the shoe rack number too, not just the gate. The racks run in long banks and they look the same for a hundred metres in both directions. Many pilgrims carry a cloth bag and take their shoes in instead, which removes the problem.
Agree an outside meeting point before you separate, and make it a gate number, not “by the entrance”. If your group splits across men’s and women’s areas you will come out at different gates by design.
Learn the two anchors. Gate 1 is Bab as-Salam in the south west. Gate 42 is Bab ul-Aimah in the south. If you know where the numbering starts and ends you can orient from any gate you find yourself at.
Where the mosque sits in a Madinah itinerary
The mosque is the centre of the stay, but most pilgrims also want Quba, Uhud, Jannat al-Baqi and the Seven Mosques. Those have their own timings, gate arrangements and etiquette, and we have set out the full route with gate numbers and visiting hours in the Madinah ziyarat guide.
Frequently asked questions
How many gates does Masjid Nabawi have?
Forty two gates give access to the roofed complex, per the Madain Project survey. The surrounding courtyards sit inside a separate perimeter wall with further openings, which is why other totals circulate.
Which gate number is Bab Jibreel?
Gate 40, on the eastern side near the Prophet’s ﷺ chamber. Some maps and AI answers say 44. The documented number is 40.
Which gate is nearest the Rawdah?
Bab Jibreel (40) and Bab al-Baqi (41) on the east, and Bab ul-Aimah (42) on the south, which opens directly into the Rawdah section. Entry is by timed Nusuk permit, so you are directed to an assembly point rather than choosing a gate.
What is Gate 39 at Masjid Nabawi?
Bab an-Nisa, the gate of women, on the eastern side. It is the historic women’s entrance, though current arrangements are marshalled and vary by season.
Which gate is King Fahd Gate?
Bab Malik al-Fahd, Gates 20, 21 and 22, the large northern complex facing the hotel district. It is the gate most package pilgrims arrive through.
Why do the gate numbers skip?
The major gates are complexes with three doorways each, so they take three consecutive numbers. Bab Malik al-Fahd takes 20, 21 and 22, for example. The gaps are the unnumbered or incorporated openings between them.
What is written above the gates of Masjid Nabawi?
Surah al-Hijr 15:46, udkhuluhā bisalāmin āminīna, “Enter it in peace, secure”, on a stone plaque above each door.




