The Gates of Masjid al-Haram: Complete History and Visitor’s Guide to Every Entrance of the Grand Mosque in Makkah

Every pilgrim who has ever circled the Kaaba arrived through a door. For most of Islamic history that door was one of a small number of named openings in a low stone wall — Bab Bani Shaybah, Bab al-Safa, Bab Ibrahim — each with its own history, its own place in the memory of the city, and in some cases its own disputed claim to merit. Today the same journey passes through one of well over two hundred numbered entrances set into a building that covers not quite four hundred thousand square metres and can, at peak capacity, hold several million people at once. The gates of Masjid al-Haram are not a footnote to the history of the Grand Mosque. They are its skeleton — the fixed points around which every expansion, every caliph’s ambition, every Ottoman sultan’s restoration and every Saudi megaproject has been organised. This guide traces that skeleton from the first stone wall Caliph Umar ibn al-Khattab raised around the Kaaba in 17 AH to the numbered gates a visitor uses today, and it tries, wherever the sources allow, to separate what is documented from what is merely repeated.

This is also, deliberately, a practical guide. Pilgrims get lost at the Haram constantly — separated from family members in a crowd of a million strangers, unable to relocate the gate they entered by, uncertain which entrance leads to the women’s prayer areas or the nearest functioning wudu station. A guide to the gates that only recites their names is incomplete. Where the sources permit it, this article tries to give the kind of concrete, checkable detail — gate numbers, nearby landmarks, which entrances serve the Mataf and which serve the Mas’a, where the wheelchair access points are — that is actually useful to someone standing outside the mosque with a phone at twelve percent battery. It is written as a guide to the Islamic history of Masjid al-Haram for the reader who wants the full picture, and as a Ziyarah guide for the reader who needs to find a door in the next ten minutes.

One warning belongs at the very front, not the back. The Grand Mosque has been under continuous, overlapping construction for most of the last two decades, and the pace has not slowed. Gate numbers have been reassigned, gates have been closed for years at a time, whole facades have been demolished and rebuilt in a different style a few metres away. Every specific number, name and location given in this article reflects the best information available as of mid-2026, drawn from official Saudi sources, the specialist architectural reference Madain Project, and pilgrim-facing tour operator guides, cross-checked against each other wherever possible. It should be treated as a snapshot, not a permanent record. Practical advice on how to verify the current layout on arrival is given in the Practical Visitor Guide section below, and it is worth reading before you fly.

Historical Background

A Sanctuary Before It Was a Building

Before Masjid al-Haram was a mosque in the architectural sense — before it had a wall, a roof, or a single door — it was a sanctuary in the older and more basic sense: a demarcated area of ground, centred on the Kaaba, within which certain behaviours were forbidden. Islamic tradition holds that the Kaaba itself predates the mosque built around it by many centuries, associated in the Qur’an with Ibrahim (Abraham) and his son Ismail, who are described as raising its foundations at Allah’s command. The Qur’an records their prayer at the site:

﴿وَإِذْ يَرْفَعُ إِبْرَاهِيمُ الْقَوَاعِدَ مِنَ الْبَيْتِ وَإِسْمَاعِيلُ رَبَّنَا تَقَبَّلْ مِنَّا ۖ إِنَّكَ أَنتَ السَّمِيعُ الْعَلِيمُ﴾

“And [mention] when Ibrahim was raising the foundations of the House along with Ismail, [saying], ‘Our Lord, accept [this] from us. Indeed You are the Hearing, the Knowing.'”

Surah al-Baqarah 2:127

For the many centuries between that event and the mission of the Prophet Muhammad ﷺ, the sanctuary had no enclosing wall at all. The Kaaba stood in open ground, surrounded by houses belonging to the various clans of Quraysh, whose owners had by custom left a corridor of space around the building for circumambulation. There was no gate because there was, in the strict sense, no building to have one. This is a detail worth holding onto, because it means every gate discussed in this article — without exception — is a historical addition, built by a named ruler or dynasty at a specific point in time, and not part of any original, unchanging plan. The idea that a particular gate carries ancient, fixed sanctity independent of later human construction does not survive contact with the architectural history, and this becomes important later when the article turns to common misconceptions about gates such as Bab al-Salam.

Why a Wall Was Needed

The transformation from open sanctuary to walled mosque began under the second caliph, Umar ibn al-Khattab, in 17 AH (638 CE). According to the historical accounts collected by later Muslim historians, the growing number of pilgrims performing tawaf around the Kaaba had begun to spill into the surrounding houses, creating disputes with the residents whose walls bounded the circumambulation space. Umar’s solution was direct: he purchased and, in some accounts, compulsorily acquired the surrounding houses, demolished them, and built a low wall around the newly cleared area, establishing for the first time a defined, bounded precinct — a mosque in the structural sense, rather than simply a sanctuary in the open air. This first enclosure is generally reported to have added around 1,500 square metres to the sanctuary, brought its total area to roughly 3,600 square metres, and — critically for this article — it is the point at which gates, in the true architectural sense of formal openings in a boundary wall, first appear in the history of Masjid al-Haram.

Uthman ibn Affan, the third caliph, expanded the mosque further in 26 AH (647 CE), again buying out neighbouring houses over the objections of some residents, and introduced the first covered porticoes with marble columns along the mosque’s perimeter — an architectural innovation that would define the character of the Haram’s edges for the next thirteen centuries. The mosque grew again under Abdullah ibn al-Zubayr after 64 AH, following the first siege of Makkah and a fire that damaged the Kaaba itself; ibn al-Zubayr rebuilt the Kaaba according to a hadith-based account of its original Ibrahimic dimensions and enlarged the surrounding mosque to around 7,465 square metres. After the Umayyad general al-Hajjaj ibn Yusuf recaptured Makkah for Abd al-Malik ibn Marwan in 74 AH, the Kaaba was reverted to the form known from the time of Quraysh’s pre-Islamic rebuilding, and the caliph undertook his own renovation of the surrounding mosque, raising its outer walls and adding decoration. Al-Walid I, continuing Umayyad investment in the sanctuary, extended its wings, added what is usually described as its first minaret, and used marble columns imported from Syria and Egypt — the beginning of a long tradition of drawing building materials for the Haram from across the Muslim world.

The Abbasid Transformation

The most significant pre-modern expansion of the mosque came under the Abbasid caliphs. Al-Mansur enlarged the mosque between 137–140 AH (754–757 CE) and is credited with adding a minaret on its eastern side. But the decisive Abbasid intervention was the expansion begun by Caliph al-Mahdi in 164 AH (779–780 CE) and completed after his death by his son, Caliph al-Hadi. This project added some 12,512 square metres to the mosque, brought the building substantially to the footprint later Muslims would have recognised for the next thousand years, and introduced marble columns — again shipped from Egypt and Syria — with gilded teak-wood inlay capitals. Crucially for a history of the gates, it was al-Mahdi’s expansion that established most of the named historic gates on the mosque’s southern side that this article discusses below: the Bazan Gate, the al-Baghla Gate, Bab al-Safa, the Ajyad Gate, the Gate of the Egyptian Hospice, and the Umm Hani Gate. These same gates were later renovated by the Ottoman Sultan Murad Khan in 984 AH but were not demolished and rebuilt from scratch until the twentieth century, meaning that for over a millennium, a pilgrim entering Masjid al-Haram from the south was passing through a doorway that, in its essential footprint, dated to the Abbasid caliphate.

Later Abbasid rulers continued to modify the gate arrangement without expanding the mosque’s overall footprint. Caliph al-Mu’tadid, who reigned from 279–289 AH, is recorded as having demolished the Dar al-Nadwah — the pre-Islamic Quraysh assembly house associated with Qusayy ibn Kilab — and converted its site into a portico opening onto the mosque through six new gates, while also adding twelve internal doors and three external doors elsewhere in the complex. By the time the tenth-century Jerusalemite geographer al-Maqdisi described the mosque in his surviving accounts, he counted nineteen gates in total, with five gates on the eastern side alone, and singled out Bab Bani Shaybah as the most important of them all — a judgment about a gate whose full story, and whose confused relationship to the modern gate that carries a similar name, occupies a dedicated section of this article below.

Ottoman Care of an Old Building

For most of the Ottoman period, the mosque’s footprint did not change, but its fabric did. Sultan Selim II commissioned the great architect Mimar Sinan to rebuild the mosque’s roofline in 975 AH (1571 CE), replacing a flat wooden roof with a series of small stone domes carried on rows of columns — an intervention whose surviving physical traces are today considered the oldest architectural elements still visible in the mosque. After catastrophic flooding damaged the sanctuary in 1039 AH (1629–1630 CE) — flooding severe enough to sweep away parts of the Kaaba’s structure — Sultan Murad IV undertook a major renovation, rebuilding the Kaaba, adding a stone arcade around the mosque’s perimeter, and bringing the number of minarets to seven, a number that held for centuries and is still referenced in some tourist literature today, even though the mosque now has considerably more. It was this Ottoman-era mosque — domed, arcaded, encircled by named gates dating in their footprint to the Abbasids and in their decoration to the Ottomans — that travellers, pilgrims and the earliest photographers of Makkah in the nineteenth century would have recognised, and that stood essentially unchanged until the Saudi expansions of the twentieth century swept almost all of it away.

The Story Behind the Place

A Threshold, Not a Destination

It is easy, writing about gates, to treat them as architecture and nothing more — measurements, materials, dates of construction. But a gate at Masjid al-Haram has never been simply a piece of architecture to the person walking through it. It is the last threshold before the Kaaba comes into view, often for the first time in a pilgrim’s life. The accounts of early Muslims arriving in Makkah, and the accounts of pilgrims today, converge on one detail: the moment of first sight of the Kaaba, framed by whichever gate a person happened to walk through, is remembered more vividly than almost anything else about the journey. This is one reason gates acquired names, stories, and eventually reputations — some deserved, some not — for special merit. The story of the gates is, in large part, the story of pilgrims trying to make sense of, and hold onto, that threshold moment.

The Gate of the Key-Bearers

No gate carries more layered history than the one associated with the Banu Shaybah, the clan entrusted with the key to the Kaaba. According to the account preserved in Ibn Hisham’s recension of Ibn Ishaq’s biography of the Prophet ﷺ, when Makkah fell to the Muslims in 8 AH (630 CE), the Prophet ﷺ sent for the key of the Kaaba, which was held by Uthman ibn Talha of the Banu Shaybah clan. After entering the Kaaba and removing the idols within it, the Prophet ﷺ returned the key to Uthman ibn Talha with words that fixed his clan’s role for the remainder of Islamic history: “Take it, O Bani Talha, eternally up to the Day of Resurrection, and it will not be taken from you unless by an unjust, oppressive tyrant.” This account, transmitted through Ibn Ishaq’s chain, is graded by specialists as Hasan rather than fully authenticated in the strictest sense, since it depends on the biographical tradition (siyar) rather than the more tightly scrutinised hadith collections, though it is widely accepted by historians as reflecting a genuine event; a related version transmitted through al-Tabarani carries a weaker chain, affected by a narrator, Abdullah ibn al-Mu’ammal, whom hadith critics have criticised. A note on authenticity: readers should understand that the key-handover narrative sits in the domain of accepted historical report rather than strictly graded hadith, and that scholars differentiate between the Ibn Ishaq transmission, treated as reasonably reliable, and the weaker al-Tabarani version. What is not in dispute, because it continues in observable practice today, is that the Banu Shaybah’s descendants still hold ceremonial responsibility for the Kaaba: members of the family take part in the periodic cleaning ceremony of the Kaaba’s interior, greeting invited guests at the door exactly as their ancestor once held the key at that same threshold.

The gate that took its name from this clan — Bab Bani Shaybah, alternatively transliterated Bab Bani Shaiba — stood for most of Islamic history not as a wall-mounted door but as a small, freestanding stone arch a short distance east of the Maqam Ibrahim, inside the Mataf itself, according to the architectural reference Madain Project’s history of Bab Bani Shaiba. It was never part of an outer boundary wall; it marked, instead, a point pilgrims passed through on their way toward the Kaaba after entering the mosque elsewhere. The arch reportedly stood some eight metres high at its peak, resting on two square columns, and carried Qur’anic inscriptions on both faces: on the outward-facing crown, the words of Surah al-Hijr, “enter it in peace and security” (Surah al-Hijr 15:46), and on the inner, lower face, the supplication of Surah al-Isra, “My Lord, cause me to enter a secure entrance and to exit a secure exit and grant me from Yourself a supporting authority” (Surah al-Isra 17:80). This freestanding arch — the one al-Maqdisi called the most important of the mosque’s nineteen gates in the tenth century — was finally demolished on 18 Rajab 1387 AH (22 October 1967 CE), as part of Saudi-era work to clear the Mataf of above-ground structures and give circumambulating pilgrims more open space. Its removal is a critical fact for any visitor trying to understand the modern mosque: the historic Bab Bani Shaybah pilgrims read about in classical sources no longer exists in any form, and the numbered gate that today carries a similar name, located on the mosque’s eastern flank near Mount Marwah, occupies a different position entirely and should not be assumed to inherit the older arch’s specific reported virtues. This distinction is explored in full, together with the authenticity of reports about entering by this route, in the dedicated discussion of Bab al-Salam and Bab Bani Shaybah later in this article.

A Door Named for Victory

Other gates carry names remembered for centuries with less ambiguity, if not always with fully documented origin stories. Bab al-Fath, the Gate of Victory, on the mosque’s southern side, is popularly associated in guidebooks and oral tradition with the route the Prophet ﷺ is said to have taken into Makkah at its conquest in 8 AH. This association should be treated as tradition rather than an established, sourced fact: the classical biographical accounts of the conquest describe the Prophet ﷺ entering the city and eventually reaching the Kaaba, but a specific, chain-verified claim tying that entry route to the exact footprint of the gate later named Bab al-Fath has not been located in the sources consulted for this article, and readers should treat the connection as a plausible, longstanding local tradition — a Scholarly opinion and popular association rather than a documented historical fact — rather than a certainty. What is certain is that the name itself, “Gate of Victory,” has attached itself to this location for a very long time, and that the gate remains, in the numbered system used today, one of the mosque’s five principal entrances.

A Door Named for the Final Farewell

Bab al-Umrah carries a similarly beloved, similarly under-documented tradition: that it marks the route by which the Prophet ﷺ entered Makkah for his final, or “farewell,” Umrah in the year of the conquest, in the spring of 8 AH. As with Bab al-Fath, this is a tradition repeated widely in pilgrim-facing literature rather than a claim this article can trace to a specific graded hadith naming this exact gate. It should be enjoyed as a piece of living memory attached to a place — the kind of story that gives a modern, largely rebuilt gate a thread of connection to the seventh century — while being clearly labelled as tradition rather than documented history. The gate today is one of the five principal, most heavily used entrances to the mosque, and its story is told to nearly every pilgrim who passes through it, which is itself a small illustration of how oral memory operates around sacred architecture: repetition, over centuries, does the work that documentation cannot always do.

Gates Named for Companions

A walk around the mosque’s perimeter today is, in effect, a walk through a roll call of the earliest generation of Muslims. Bab Ali, on the eastern facade near the Sa’i gallery, carries the name of Ali ibn Abi Talib, the Prophet’s cousin and son-in-law and the fourth caliph; this gate was also historically used, according to several architectural sources, for funeral processions, adding a further, sombre layer to its history. Bab Abbas, nearby, is named for al-Abbas ibn Abd al-Muttalib, the Prophet’s uncle and the ancestor of the Abbasid dynasty. Bab Umar, elsewhere on the mosque’s perimeter, honours the second caliph, Umar ibn al-Khattab — the same man who built the mosque’s first enclosing wall in the first place, so that the mosque today contains a gate named after its own founder. Bab Bilal commemorates Bilal ibn Rabah, the Abyssinian companion freed from slavery who became the first person to call the adhan in Islam. Further gates carry the names of the Prophet’s wives — Bab Khadijah, Bab Aisha bint Abi Bakr, Bab Asma bint Abi Bakr, Bab Maimounah — and of companions such as Jabir ibn Abdullah, Saeed ibn Zaid, Zaid ibn Thabit, Ammar ibn Yasir, Muadh ibn Jabal, and Amr ibn al-As. None of these gates, in their present numbered form, are seventh-century structures; nearly all date to the twentieth-century Saudi expansions. But the naming convention itself continues a very old habit, visible already in the Abbasid-era gate names recorded by al-Maqdisi, of using the mosque’s doorways as a kind of permanent memorial roll for the people who built the early Muslim community.

The Named Historic Gates in Detail

Bab al-Salam and the Question of the “Correct” Entrance

No gate in the mosque’s history carries more emotional weight, or more confusion, than Bab al-Salam — the Gate of Peace. The name itself draws directly on the Qur’anic language inscribed on the historic Bab Bani Shaybah arch discussed throughout this article: “Enter it in peace and security” (Surah al-Hijr 15:46). For many generations of pilgrims, entering through this gate — historically understood as being at or near the position of the freestanding Bab Bani Shaybah arch, close to the Maqam Ibrahim — became a cherished, widely followed custom, reinforced by the belief that the Prophet ﷺ himself favoured this route. As established in the Hadith References and Common Misconceptions sections above, the specific, chain-verified textual basis for this belief is thinner than its popularity suggests: the strongest authentic hadith describing the Prophet’s ﷺ movement through a gate, Jabir’s account of the Farewell Pilgrimage, names only “the gate to al-Safa” as his exit point after tawaf (Sahih Muslim 1218), not a named entry gate, and no authentic hadith instructs later pilgrims to seek out this specific location as a religious obligation. The Permanent Committee’s ruling is unambiguous that entering via Bab al-Salam specifically is not obligatory (Islam Question and Answer, fatwa 109317). A note on authenticity: the custom of entering via Bab al-Salam is best understood as a beloved, longstanding tradition — a devotional practice many scholars regard as permissible and even praiseworthy to follow if convenient, but not as an established sunnah maqsudah carrying independent merit or obligation. Readers who wish to follow the custom should feel free to do so; readers who cannot reach that specific gate, or whose modern hotel and crowd-flow logistics make a different gate more practical, are not missing out on any documented reward. Compounding the confusion, the gate pilgrims today most often hear referred to as “Bab al-Salam” is not in a fixed, universally agreed location relative to the historic arch; various numbered gates near the Marwah side of the mosque have carried this informal designation at different points as the building has been rebuilt, and the modern numbered Gate 22, Bab Bani Shaibah, discussed below, is a related but architecturally distinct structure.

Bab Bani Shaybah: One Name, Two Places, Fourteen Centuries

The full history of Bab Bani Shaybah has already been traced across several sections of this article, but it is worth consolidating here because the gate’s story is genuinely unusual: it is a name that has attached itself to at least two physically distinct structures across Islamic history. The original, historic Bab Bani Shaybah was never a wall-mounted gate at all. It was a small freestanding arch standing inside the Mataf itself, a short distance east of the Maqam Ibrahim — a position that placed it directly in the path of pilgrims completing tawaf and turning toward the Station of Ibrahim, which likely explains both its historic prominence and al-Maqdisi’s tenth-century judgment that it was the most important of the mosque’s nineteen gates. Roughly eight metres tall, resting on two square columns, and inscribed with Surah al-Hijr 15:46 on its outer face and Surah al-Isra 17:80 on its inner face, this arch stood in essentially the same spot from a period reaching back to the Prophet’s ﷺ own lifetime until its demolition on 18 Rajab 1387 AH (22 October 1967 CE), removed specifically to give pilgrims more open space for circumambulation as Hajj numbers grew (Madain Project). The modern gate numbered 22 in today’s system, also called Bab Bani Shaibah, sits on the mosque’s eastern flank near Mount Marwah — a location with no direct architectural continuity to the historic arch beyond the shared clan name. A pilgrim today who is told they are entering “Bab Bani Shaybah” is entering a twentieth-century Saudi structure at a different point in the building entirely, and should understand that any merit attached in popular memory to the historic arch does not automatically transfer to this modern, differently located gate.

Bab al-Fath: The Gate of Victory

Located on the mosque’s southern side and numbered Gate 45 in the current system, Bab al-Fath — “the Gate of Victory” — is one of the mosque’s five principal entrances. Its name is popularly, and plausibly, connected to the conquest of Makkah in 8 AH, though as discussed above, the authentic hadiths describing the conquest identify the Prophet’s ﷺ entry point into the city as Kada, in Makkah’s upper region (Sahih al-Bukhari 4290), rather than naming this specific gate by its later title. The gate has been a focus of recent, visible investment: minaret construction at Bab al-Fath, alongside the two other principal historic-named gates, proceeded as a distinct phase of the King Abdullah Expansion between 2019 and 2023, meaning its current silhouette — including its minaret — is a genuinely recent addition rather than an inheritance from the Abbasid or Ottoman periods.

Bab al-Umrah: The Gate of the Final Farewell

Bab al-Umrah, numbered Gate 62 in the Saudi Ministry of Hajj’s own official visitor literature (though frequently cited as Gate 63 in tour-operator sources, a discrepancy this article flags rather than silently resolves), is another of the mosque’s five principal gates, providing direct access to the Mataf from the northwest. Its name is traditionally connected to the Prophet’s ﷺ final Umrah, performed in the spring of 8 AH after the conquest of Makkah — a beloved and widely repeated association, though, as with Bab al-Fath, this article was unable to locate a specific hadith naming this exact modern gate location in connection with that journey, and the association should be understood as long-held popular tradition rather than documented hadith. The gate was substantially renovated during the King Abdullah Expansion, rebuilt, according to several sources, “on the pattern” of the King Abdul Aziz Gate, giving the two principal gates a related visual identity despite standing on opposite sides of the building.

Bab al-Ajyad: Named for the Valley of Horses

Bab al-Ajyad takes its name from the Ajyad district and valley immediately southeast of the mosque, an area whose own name is traditionally connected to fine horses once kept or traded there. The modern gate, a comparatively small single-portal structure dating to the first Saudi expansion, sits near the escalator cluster that carries pilgrims to the mosque’s upper floors, and functions today more as a secondary, functional access point than as a gate associated with any specific narrated event from the Prophet’s ﷺ life. Its history is nonetheless continuous with the older tradition: the historic Abbasid-era southern gate complex established under al-Mahdi in 164 AH included its own Ajyad Gate, also recorded under the name Bab al-Rahmah (“Gate of Mercy”) and, in at least one source, the “Gate of the Mujahideen,” and this historic gate was renovated by Ottoman builders under Sultan Murad Khan before being demolished along with the rest of the southern gate complex during the first Saudi expansion.

Bab al-Safa: The Threshold to the Sa’i

Bab al-Safa carries perhaps the strongest direct textual connection of any named gate to an authentic hadith, given Jabir’s report that the Prophet ﷺ “went out of the gate to al-Safa” immediately before beginning the Sa’i between Safa and Marwah during his Farewell Pilgrimage (Sahih Muslim 1218). The historic version of this gate, established under al-Mahdi’s Abbasid-era expansion, was an elaborately decorated structure: five niched entrances beneath a central arch carved with muqarnas stonework, with Qur’anic verses 2:158 and 3:133 — both directly relevant to the Safa-Marwah ritual — inscribed above. It was also known historically under the alternative names Bab Bani Makhzum and Bab Addi bin Ka’ab, reflecting the Quraysh clan affiliations of the area before Islam. The modern gate, numbered around 11 or 12 in the current system depending on the source consulted, continues to provide direct access to the start of the Sa’i route and to the mosque’s upper floors, though its physical form today is a twentieth-century reconstruction rather than the Abbasid-Ottoman structure Jabir’s hadith and the later inscriptions describe.

Bab Ali: A Gate for the Fourth Caliph, and for Funerals

Bab Ali, on the mosque’s eastern facade near the Sa’i gallery and numbered 17 in the modern system, honours Ali ibn Abi Talib, the Prophet’s ﷺ cousin, son-in-law, and the fourth Rashidun caliph. The gate is also recorded as having historically served a specific secondary function: the passage of funeral processions, giving it a role in the mosque’s life beyond ordinary entry and exit. An alternative historic name for this location, Bab Bat’ha, referencing the wider valley floor on which Makkah sits, is also recorded in the architectural literature. As with the majority of named gates discussed in this article, the modern Bab Ali is a Saudi-era structure honouring Ali’s memory rather than a direct architectural descendant of any gate that stood in his own lifetime, since the mosque of that period had not yet been expanded to include a formal eastern facade in the sense the term carries today.

Bab an-Nabi: The Gate of the Prophet

Bab an-Nabi — “the Gate of the Prophet” — sits on the mosque’s eastern side near the Safa and Sa’i area, numbered 14 in the modern system, with an associated upper-floor bridge access point, Bab an-Nabi Bridge, numbered separately as Gate 15. The name itself is a general dedication rather than a claim tied to one specific narrated event, and this article did not locate a documented account specifying which particular action or visit of the Prophet ﷺ the gate’s name is meant to commemorate, beyond the general and entirely well-attested fact of his lifelong association with the sanctuary as a whole, discussed at length in the Prophet ﷺ and This Place section above. Readers should understand the name as an honorific dedication in the same broad tradition as the many companion-named gates elsewhere in the mosque, rather than as marking a specific, documented incident unique to this location.

Other Historic Southern Gates Lost to the First Saudi Expansion

Beyond Bab al-Safa and the Ajyad Gate, the Abbasid-era southern gate complex established under al-Mahdi in 164 AH included several other named gates, all demolished during the first Saudi expansion and none directly reconstructed under the same name and form in the modern numbered system. The Bazan Gate, also recorded as Bab Bani Aidh or Bab al-Qarrah Qul, and separately as Bab al-Naoush, is specifically remembered in the historical literature as the route by which coffins departed the mosque en route to the al-Mu’alla cemetery — giving it, like Bab Ali, a specific funerary function within the mosque’s daily life. The al-Baghla Gate, also called the Bani Sufyan Gate, and the Gate of the Egyptian Hospice, also called Bab al-Takkiya or Bab Banu Taim and inscribed with verse 50 of Surah ar-Rum, complete the set of named southern gates recorded before the twentieth-century rebuilding. All of these were renovated, but not rebuilt in a fundamentally new form, by Sultan Murad Khan’s Ottoman-era restoration in 984 AH, meaning their final form before demolition was substantially the same footprint the Abbasids had established some eleven centuries earlier — one of the longest continuities of any architectural feature discussed in this article, and one that ended, finally and completely, within living memory of people alive today.

Companion-Named Gates on the Southern and Eastern Flanks

A cluster of modern gates on the mosque’s southern facade continues the practice of honouring early Muslims: Bab al-Bilal, commemorating Bilal ibn Rabah, whose presence at the Prophet’s ﷺ side during the conquest-day entry into the Kaaba is discussed above; Bab al-Hunain, named for the town of Hunayn near Ta’if, site of a significant early battle, now partly obscured on the ground by the Ajyad escalator structure; and Bab al-Ismail, honouring the Prophet Ismail, whose foundational connection to the Kaaba itself is discussed in the Historical Background section. Further along the eastern flank, Bab Abbas honours al-Abbas ibn Abd al-Muttalib, the Prophet’s ﷺ uncle and ancestor of the Abbasid dynasty whose caliphs did more than any other pre-modern rulers to shape the mosque’s gate arrangement, and Bab Bani Hashim honours the Prophet’s ﷺ own clan directly. None of these gates, in their current numbered form, predate the twentieth century, but the naming convention itself — using the mosque’s doorways as a permanent roll call of the earliest generation of Muslims — is, as established earlier in this article, a genuinely old practice reaching back to the Abbasid period.

The Story Behind the Place: Further Threads

The Egyptian Hospice and the Charity Built Into a Gate

Among the historic southern gates lost to the first Saudi expansion, the Gate of the Egyptian Hospice deserves a fuller telling, because its name records something easily missed in a list of dedications: an act of ongoing charitable endowment rather than a single historical event or companion’s memory. A “hospice” in this context — a takkiya, hence the gate’s alternative name Bab al-Takkiya — was a charitable institution providing food, shelter or care to pilgrims and the poor, endowed and maintained across centuries by donors, often connected to Egypt given the gate’s name and the long-standing role of Egyptian rulers, from the Mamluks onward, as patrons of the Two Holy Mosques. That a gate of the sanctuary itself came to be named for a charitable institution, rather than for a companion or caliph, says something about how thoroughly the practical, day-to-day welfare of pilgrims was woven into the sacred geography of the mosque’s perimeter: this was never simply a building for ritual, but a working institution that fed and sheltered the people who came to it, and the gate’s name preserved that memory long after the specific hospice itself had faded from active use. The inscription of verse 50 of Surah ar-Rum on this gate — a verse concerned with the signs of Allah’s mercy visible in the revival of the earth after rain — reinforces the same theme of mercy and provision that the hospice itself embodied in practical form.

Dar al-Nadwah: From Pagan Council House to Mosque Gates

One of the more striking transformations in the mosque’s gate history concerns the Dar al-Nadwah, the pre-Islamic assembly house built, according to the biographical and historical tradition, by Qusayy ibn Kilab, the ancestor of Quraysh credited with consolidating the tribe’s control over Makkah and the Kaaba generations before Islam. In its original function, the Dar al-Nadwah was the meeting place where Quraysh’s leading men debated matters of war, marriage, and trade — the closest thing pre-Islamic Makkah had to a civic institution. It stood adjacent to, but outside, the sanctuary itself. When Caliph al-Mu’tadid demolished the structure in the late ninth century CE and converted its footprint into a portico opening onto the mosque through six new gates, the physical space that had once hosted Quraysh’s pagan tribal councils became, permanently, an extension of the House of Allah — a conversion of civic to sacred space that has no clean parallel elsewhere in the mosque’s recorded history, and one that later Muslim historians clearly considered worth preserving in memory, since the association between this specific stretch of the mosque’s perimeter and the old council house survived in the historical record for over a thousand years afterward.

What the Numbers Cannot Tell You

It is worth pausing, before moving into the more technical sections of this article, to say plainly what the modern numbered gate system cannot convey on its own. A number like “Gate 62” or “Gate 100” carries no history in itself; it is a purely administrative label, assigned during a specific twenty-first-century construction phase, that could in principle have been assigned to any other opening in the building. The history recounted throughout this article — the Banu Shaybah’s key, the Abbasid inscriptions, the Ottoman domes, the freestanding arch that stood for a millennium and then vanished in a single day in October 1967 — belongs to names, not numbers. A pilgrim who learns only the numbers from a resource such as Madain Project’s gate inventory, useful as they are for finding their way back to a meeting point, misses the deeper layer of memory the names still carry, however imperfectly that memory has survived the building’s repeated demolition and reconstruction. This article has tried to give both: the numbers a visitor actually needs on the ground, and the names that explain why the mosque’s perimeter looks and is organised the way it is.

The Prophet ﷺ and This Place

Before the Hijra: A Doorway He Knew from Childhood

The Prophet Muhammad ﷺ was born in Makkah and lived within sight of the Kaaba for the first fifty-three years of his life, long before any of the numbered or named gates discussed in this article existed in their present form. In this earliest period the sanctuary had no enclosing wall at all — the houses of Quraysh stood around the Kaaba with an open corridor of space left for circumambulation, exactly as described in the Historical Background section above. The Prophet ﷺ would have walked into that open space from any direction, as any Makkan could, since there was, in the strict sense, no gate to use. What the sources do record from this period is his repeated presence at the Kaaba itself: his participation, as a young man, in the rebuilding of the Kaaba after a flood, when he is reported to have helped carry stones and to have been chosen to resolve a dispute among the clans over who would have the honour of setting the Black Stone back in place — a story recorded in the biographical tradition rather than in a single graded hadith, and treated here as historically well-attested through the siyar literature rather than as hadith in the technical sense.

The Conquest: Which Way Did He Actually Come In?

The most historically significant, and most reliably documented, moment connecting the Prophet ﷺ to a specific point of entry into Makkah is the conquest of the city in Ramadan of 8 AH (630 CE). Here the sources are unusually precise, because the event is recorded in Sahih al-Bukhari through multiple independent chains. Aisha رضي الله عنها reported: “During the year of the Conquest of Mecca, the Prophet ﷺ entered Mecca through Kada, which was at the upper part of Mecca” (Sahih al-Bukhari 4290), a report corroborated by a nearly identical narration from Urwa ibn al-Zubayr on the authority of his father (Sahih al-Bukhari 4290). A related report specifies that while the Prophet ﷺ himself entered from Kada in Makkah’s upper region, he ordered Khalid ibn al-Walid to lead a column in through the same upper approach, and that the Prophet ﷺ later departed the city through a different point, Kuda (Sahih al-Bukhari 1578). These reports are graded Authentic (sahih) without dispute, and they describe the Prophet’s ﷺ entry into the city of Makkah as a whole, approaching from its northern high ground — they do not, in their wording, identify a specific gate of the mosque itself, because at that date the mosque had no enclosing wall or named gates in the developed sense this article otherwise discusses. Readers should therefore treat the popular association of Bab al-Fath with the exact conquest-day entry route as a longstanding local tradition rather than a claim directly supported by the wording of these authentic hadiths, which describe Kada as a place in the wider topography of Makkah, not as the location of a later-built mosque gate.

Immediately after the conquest, the Prophet ﷺ proceeded to the Kaaba itself. Abdullah ibn Abbas reported that as the Prophet ﷺ entered Makkah, three hundred and sixty idols stood around the Kaaba, and that he struck each one with a stick in his hand, declaring, “Truth has come and falsehood will neither start nor will it reappear” (Sahih al-Bukhari 4287) — a report graded Authentic (sahih). He then sent for Uthman ibn Talha of the Banu Shaybah clan, the hereditary key-bearer, and had him bring the key to the Kaaba’s door. According to Abdullah ibn Umar’s report, transmitted through the jurist Nafi’, the Prophet ﷺ, riding his she-camel al-Qaswa with Usama ibn Zayd behind him, made his camel kneel near the Kaaba, asked Uthman ibn Talha to bring the key, opened the door, and entered together with Usama, Bilal and Uthman ibn Talha, closing the door behind them from the inside (Sahih al-Bukhari 440). This report is graded Authentic (sahih), appearing in Sahih al-Bukhari through more than one chain (Sahih al-Bukhari 505), and Ibn Umar’s own account of asking Bilal what had happened inside, once the door reopened, is one of the most detailed authentic descriptions of the Kaaba’s interior arrangement that survives — six pillars, arranged in two rows, with the Prophet ﷺ praying between two of them, one pillar to his left, one to his right, and three behind him.

The Farewell Pilgrimage: Tawaf, the Station of Ibrahim, and Leaving Toward Safa

The most complete authentic account connecting the Prophet ﷺ to the specific choreography of entering the sanctuary, circling the Kaaba, and departing toward a gate comes not from the conquest but from his one and only Hajj, the Farewell Pilgrimage of 10 AH (632 CE), preserved in the long hadith of Jabir ibn Abdullah recorded in Sahih Muslim. Jabir’s detailed narration describes how, upon reaching the House, the Prophet ﷺ touched the Black Stone corner, performed seven circuits — running the first three and walking the remaining four — then went to the Station of Ibrahim (Maqam Ibrahim) and recited the Qur’anic instruction to take it as a place of prayer, praying two short rak’ahs there with the Station between himself and the Kaaba. He then returned to the Black Stone corner, kissed it, and, in Jabir’s precise wording, “went out of the gate to al-Safa”, reciting the Qur’anic verse naming Safa and Marwah as signs of Allah before mounting Safa itself, where he faced the Kaaba and made prolonged supplication (Sahih Muslim 1218). This hadith is graded Authentic (sahih) and stands as one of the two or three most important texts underpinning the entire ritual sequence of Umrah and Hajj. It confirms, in the Prophet’s ﷺ own recorded practice, that there was a specific gate in the sanctuary’s arrangement at that time associated with the route toward Safa — almost certainly the gate later called Bab al-Safa, discussed in the section on named historic gates below — though the hadith itself, in the wording preserved by Muslim, does not use the specific name “Bab al-Safa” or “Bab Bani Shaybah”; it simply says he “went out of the gate to al-Safa.” Any claim that this hadith names Bab Bani Shaybah specifically should be treated with caution, since that specific identification depends on separate historical and topographical reasoning about where such a gate stood relative to the Safa route, not on the wording of the hadith text itself.

The Key Returned, Forever

After emerging from the Kaaba on the day of the conquest, the Prophet ﷺ returned the key to Uthman ibn Talha with the words recorded in the biographical tradition and discussed above: an instruction that the custodianship remain with the Banu Shaybah clan permanently, barring seizure by an unjust tyrant. This act — handing back, rather than keeping, the symbol of authority over the House he had just liberated from idolatry — is treated in the Islamic tradition as a deliberate demonstration that the conquest was not a seizure of personal or tribal power. The Prophet ﷺ could have kept the key himself, or given it to his own clan, the Banu Hashim; he chose instead to restore the pre-Islamic custodial arrangement almost exactly as it stood, changing only the object of devotion inside the building from idols to the One God. The Banu Shaybah’s descendants have held that same ceremonial role, essentially without interruption, for over fourteen centuries, and this continuity is one of the more remarkable, verifiable threads connecting the modern Grand Mosque directly back to an action of the Prophet ﷺ himself.

Qur’anic Connections

“Enter It in Peace and Security”

﴿قُلْ لِعِبَادِيَ الَّذِينَ آمَنُوا يُقِيمُوا الصَّلَاةَ وَيُنفِقُوا مِمَّا رَزَقْنَاهُم سِرًّا وَعَلَانِيَةً مِّن قَبْلِ أَن يَأْتِيَ يَوْمٌ لَّا بَيْعٌ فِيهِ وَلَا خِلَالٌ﴾

[context verses precede the cited verse; the inscribed verse itself reads:] ﴿ادْخُلُوهَا بِسَلَامٍ آمِنِينَ﴾

“Enter it in peace and security.”

Surah al-Hijr 15:46

This verse, describing the greeting extended to the righteous as they enter the Gardens of Paradise, was inscribed on the outward-facing crown of the historic freestanding arch of Bab Bani Shaybah, according to the architectural history recorded by Madain Project. In its original Qur’anic context, the verse belongs to a passage in Surah al-Hijr describing the reward of the pious in the afterlife, addressed to angels welcoming believers into Paradise “with peace and security, free from fear.” Classical exegetes, including al-Tabari and Ibn Kathir in their respective commentaries, read this as Allah’s direct address of reassurance to the believers on the Day of Judgment, promising an entry free from the terror associated with that day. Its use on a gate of the earthly sanctuary draws a deliberate parallel between the physical act of entering the Haram — itself a place where a person is safe from bloodshed and (traditionally) from being hunted even as a fugitive — and the ultimate spiritual security of entering Paradise. The lesson drawn by generations of pilgrims passing beneath that inscription was straightforward and enduring: to cross the threshold of the Sacred Mosque is to enter a place set apart, and that a believer’s hoped-for entry into the Gardens should carry the same qualities of peace and freedom from fear.

“Cause Me to Enter a Secure Entrance”

﴿وَقُل رَّبِّ أَدْخِلْنِي مُدْخَلَ صِدْقٍ وَأَخْرِجْنِي مُخْرَجَ صِدْقٍ وَاجْعَل لِّي مِن لَّدُنكَ سُلْطَانًا نَّصِيرًا﴾

“And say: My Lord, cause me to enter a secure entrance and to exit a secure exit and grant me from Yourself a supporting authority.”

Surah al-Isra 17:80

This supplication was inscribed on the inner, lower face of the same historic arch, positioned so that a person exiting through Bab Bani Shaybah toward the outside world would read it as they left. According to the classical accounts of the asbab al-nuzul (occasions of revelation), this verse is connected by many commentators, including al-Qurtubi, to the Prophet’s ﷺ own migration from Makkah to Madinah, read as a prayer for a secure departure from one place and a secure, empowered arrival in another — though other commentators read it more generally, without pinning it to a single historical circumstance, as a request for integrity and divine support in every significant transition a believer undertakes. Ibn Kathir’s tafsir notes that the verse pairs entrance and exit deliberately, asking that both ends of a journey — not merely its destination — be marked by sincerity and security. Its placement on the inner face of the historic Bab Bani Shaybah arch turned a private, personal supplication into public, shared architecture: every pilgrim who had circled the Kaaba and was now leaving through that specific arch could read, on their way out, a prayer for exactly the security they were about to need on the roads home. The modern lesson many teachers draw from this pairing of verses — entry in peace at 15:46, departure in security at 17:80 — is that Islam frames a sacred visit not as a single static moment but as a complete, bounded journey: an entrance to be grateful for, and an exit to be prayed for, with the visit itself sandwiched meaningfully between the two.

Safa, Marwah, and the Route Out of the Gate

﴿إِنَّ الصَّفَا وَالْمَرْوَةَ مِن شَعَائِرِ اللَّهِ ۖ فَمَنْ حَجَّ الْبَيْتَ أَوِ اعْتَمَرَ فَلَا جُنَاحَ عَلَيْهِ أَن يَطَّوَّفَ بِهِمَا ۚ وَمَن تَطَوَّعَ خَيْرًا فَإِنَّ اللَّهَ شَاكِرٌ عَلِيمٌ﴾

“Indeed, al-Safa and al-Marwah are among the symbols of Allah. So whoever performs Hajj to the House or performs Umrah — there is no blame upon him for walking between them. And whoever volunteers good — then indeed, Allah is Appreciative and Knowing.”

Surah al-Baqarah 2:158

This verse is directly connected to the gate history of this article because, per the report examined above, the Prophet ﷺ recited it as he “went out of the gate to al-Safa” during his Farewell Pilgrimage (Sahih Muslim 1218). According to the asbab al-nuzul recorded by classical commentators including Ibn Kathir and al-Wahidi, some early Muslims had hesitated to walk between Safa and Marwah because idols named Isaf and Na’ilah had stood on the two hills in the pre-Islamic period, and this revelation clarified that the ritual walk was sanctioned and was, in fact, among the rites Allah himself had established, not a residue of idolatry to be avoided. The verse’s connection to the gates discussed in this article runs deeper than a single hadith: historical sources record that this verse — 2:158 — together with Aal Imran 3:133, was inscribed at the entrances of the historic Bab al-Safa, the gate through which pilgrims coming from the direction of the Kaaba would step out toward the beginning of the Sa’i route. Whether the physical gate a pilgrim uses today to reach the Sa’i gallery from the mosque carries any surviving trace of that inscription is not documented in the sources consulted for this article; what is documented is that the naming convention, linking a specific gate to this specific verse and ritual, is a genuinely old one, reaching back at least to the Abbasid-era reconstruction of the mosque’s southern gates.

The House Made Secure

﴿وَإِذْ جَعَلْنَا الْبَيْتَ مَثَابَةً لِّلنَّاسِ وَأَمْنًا وَاتَّخِذُوا مِن مَّقَامِ إِبْرَاهِيمَ مُصَلًّى﴾

“And [mention] when We made the House a place of return for the people, and [made it] safe. And take, [O believers], from the standing place of Ibrahim a place of prayer.”

Surah al-Baqarah 2:125

This verse is the Qur’anic basis for the Prophet’s ﷺ recorded practice, described above in Jabir’s hadith, of praying two rak’ahs at the Maqam Ibrahim immediately after completing tawaf — an act performed after passing through whichever gate had brought him into the sanctuary that day. Classical tafsir treats the phrase “a place of return” (mathabah) as indicating that the House is a destination people return to again and again without ever exhausting its sanctity, and “safe” (amnan) as establishing the legal principle of sanctuary — that the area is a place where fighting, hunting and the shedding of blood are forbidden, a principle directly relevant to why the sanctuary needed defined boundaries and, eventually, gates at all. The modern lesson frequently drawn from this verse, in the context of a gates-and-boundaries discussion, is that the physical act of marking a boundary — building a wall, cutting a gate into it — was never in tension with the sanctuary’s sanctity; the boundary is what allows the sanctity to be defined, protected and experienced by millions of people at once, which is precisely why Caliph Umar’s decision to wall the mosque in 17 AH, discussed above, is remembered as an act of pious stewardship rather than an unwelcome innovation.

Hadith References

On Entering Any Mosque, Including the Sacred Mosque

The single most relevant and most solidly authenticated hadith for any discussion of gates is not specific to Masjid al-Haram at all — it is the general instruction for entering any mosque. Abu Usayd reported that the Messenger of Allah ﷺ said: “When any one of you enters the mosque, he should say: ‘O Allah, open for me the doors of Your mercy,’ and when he steps out he should say: ‘O Allah, I ask You from Your bounty'” (Sahih Muslim 713). This report is graded Authentic (sahih) and is the supplication scholars point to when explaining that there is no distinct or additional dua required specifically for entering Masjid al-Haram through any particular gate — the general mosque-entry dua suffices, and applies as much to Bab al-Salam as to any of the other two hundred-plus entrances in use today. This hadith is central to the discussion of misconceptions later in this article.

Related to this is the instruction that a person entering a mosque should not sit before praying two short rak’ahs, transmitted in the collections of both al-Bukhari and Muslim (Sahih al-Bukhari 444; Sahih Muslim 714) and graded Authentic (sahih). Scholars, including the compilers of the Permanent Committee for Islamic Research and Issuing Fatwas in Saudi Arabia, explain that in the specific case of Masjid al-Haram, a person entering with the intention of performing tawaf is not required to pray these two rak’ahs first, because the tawaf itself fulfils the same function of greeting the mosque — a nuance discussed at more length in the Common Misconceptions section below, since it is frequently misunderstood as meaning tawaf is obligatory for every single person who enters the mosque for any reason.

On the Key of the Kaaba and the Banu Shaybah

The report describing the Prophet’s ﷺ decision to return the key of the Kaaba permanently to Uthman ibn Talha and the Banu Shaybah clan is preserved in the biographical tradition through Ibn Ishaq’s account as transmitted in Ibn Hisham’s recension of his biography of the Prophet ﷺ. Graded Hasan by specialists working with the biographical (siyar) literature — a category treated with somewhat more latitude than the tightly source-critical hadith collections, though still considered historically reliable — this report is corroborated in its substance, though not in its exact wording, by the authentic hadiths in Sahih al-Bukhari describing the mechanics of the key’s use on the day of the conquest (Sahih al-Bukhari 440, graded Authentic (sahih)). A separate transmission of the key-handover statement via al-Tabarani carries a chain affected by the narrator Abdullah ibn al-Mu’ammal, whom several hadith critics have criticised for weak memory, and this specific chain is therefore graded Weak (da’if). A note on authenticity: the underlying event — the Prophet ﷺ returning the key to the Banu Shaybah with words securing their custodianship “until the Day of Resurrection” — is accepted by the great majority of historians and biographers as substantially true, resting on the Ibn Ishaq transmission graded Hasan and corroborated by authentic Bukhari material describing the same day’s events; the specific wording of the Prophet’s ﷺ statement, however, should be understood as resting on a Hasan rather than a fully mutawatir or highest-grade sahih chain, and the parallel al-Tabarani wording specifically is weak.

On the Route Through “the Gate to al-Safa”

Jabir ibn Abdullah’s long hadith describing the Prophet’s ﷺ Farewell Pilgrimage states that after completing tawaf and praying at the Station of Ibrahim, the Prophet ﷺ “went out of the gate to al-Safa” (Sahih Muslim 1218), graded Authentic (sahih). As discussed in the Qur’anic Connections section above, this hadith does not use the specific name Bab Bani Shaybah or Bab al-Safa; it describes only “the gate” nearest the Safa route. Popular literature about the gates of the Haram frequently states, without qualification, that the Prophet ﷺ specifically entered and exited through Bab Bani Shaybah as a matter of established sunnah practice on every occasion. This stronger claim is not directly supported by the wording of Sahih Muslim 1218, and readers should treat the identification of “the gate to al-Safa” with any one specific named gate as a matter of historical and topographical inference by later scholars and historians, rather than something stated explicitly in the hadith text itself.

On Whether a Specific Entry Gate Is Obligatory

No hadith in the major collections instructs pilgrims that they must enter Masjid al-Haram through Bab al-Salam, Bab Bani Shaybah, or any other single named gate, and no hadith attaches a specific additional reward to doing so. The Permanent Committee for Islamic Research and Issuing Fatwas in Saudi Arabia — whose members at the time of the relevant ruling included Sheikh Abdul Aziz ibn Baz, Sheikh Abdullah al-Ghudayan, Sheikh Abdullah ibn Qa’ud and Sheikh Abdul Razzaq Afifi — issued a explicit ruling stating that it is not obligatory, and is not even a confirmed sunnah in the binding sense, to enter specifically through Bab al-Salam or to exit specifically through Bab al-Wada’ (the historic “Farewell Gate” on the Madinah side of the discussion, sometimes confused with Makkah practice); the ruling is documented in English at Islam Question and Answer, fatwa 109317. This is graded, in the terminology used throughout this article, as a Scholarly opinion reflecting the considered position of a major standing fiqh committee, rather than a hadith grading in itself, since the underlying question is one of practice and permissibility rather than a specific narration to be graded. The distinction between this scholarly ruling and the popular practice of deliberately seeking out one specific gate is examined at length in the Common Misconceptions section of this article.

On the Prophet’s ﷺ Entry to Makkah at the Conquest

Aisha’s report that the Prophet ﷺ entered Makkah through Kada, in the upper part of the city, during the year of the conquest, is recorded with multiple corroborating chains in Sahih al-Bukhari (Sahih al-Bukhari 4290; a nearly identical version appears at Sahih al-Bukhari 1578) and is graded Authentic (sahih) without dispute among the major hadith scholars. As explained above in the section on the Prophet ﷺ and this place, this hadith describes his entry to the city as a whole rather than to a specific mosque gate, since the mosque at that date had no walled perimeter comparable to what exists today.

On the Interior of the Kaaba Following the Conquest

Abdullah ibn Umar’s detailed account of the Prophet’s ﷺ entry into the Kaaba with Usama ibn Zayd, Bilal and Uthman ibn Talha, and his subsequent questioning of Bilal about where and how the Prophet ﷺ had prayed inside, is preserved with multiple chains in Sahih al-Bukhari (Sahih al-Bukhari 440; Sahih al-Bukhari 505) and graded Authentic (sahih). This hadith is one of the primary sources for understanding the physical layout of the Kaaba’s interior in the Prophet’s ﷺ own time — six supporting pillars arranged in two rows — and, by extension, for understanding that the door through which the key-bearer admitted him was a real, physical, lockable door with the specific ritual and custodial significance discussed throughout this article.

Historical Development

The Rashidun Period (11–40 AH / 632–661 CE)

As detailed in the Historical Background section above, the transformation of the sanctuary from open ground to a walled mosque with formal gates began under the second Rashidun caliph, Umar ibn al-Khattab, in 17 AH (638 CE), who purchased and cleared surrounding houses and built the first enclosing wall, expanding the sanctuary to roughly 3,600 square metres. His successor Uthman ibn Affan expanded the mosque again in 26 AH (647 CE), reaching approximately 4,390 square metres and introducing the first covered porticoes with marble columns — the architectural template that would define the mosque’s perimeter for the next thirteen centuries. Ali ibn Abi Talib’s caliphate (35–40 AH) is not associated in the sources with a major structural expansion of the mosque, a period consumed instead by internal conflict within the Muslim community; his name nonetheless survives on the modern Bab Ali.

The Umayyad Period (41–132 AH / 661–750 CE)

The most dramatic Umayyad-era event at the sanctuary was not an expansion but a siege and reconstruction. During the second civil war, Abdullah ibn al-Zubayr, holding Makkah against Umayyad forces, saw the Kaaba damaged by fire during the siege of 64 AH; after the siege lifted, he rebuilt the Kaaba according to a hadith he held to describe its original Ibrahimic dimensions — larger than the structure Quraysh had rebuilt before Islam — and enlarged the surrounding mosque to about 7,465 square metres. When the Umayyad general al-Hajjaj ibn Yusuf retook Makkah in 74 AH on behalf of Caliph Abd al-Malik ibn Marwan, the Kaaba was reverted to the earlier, smaller Qurayshi-era form, a decision Abd al-Malik is said to have later regretted. Abd al-Malik undertook his own renovation of the mosque’s outer walls, and his son and successor al-Walid I extended the mosque’s wings, added what several sources describe as its first minaret, and imported marble columns from Syria and Egypt — establishing the practice, repeated by nearly every subsequent dynasty, of drawing prestige building material for the Haram from across the wider Islamic world.

The Abbasid Period (132–656 AH / 750–1258 CE)

Abbasid investment in the mosque was sustained and substantial. Caliph al-Mansur’s expansion of 137–140 AH (754–757 CE) added a minaret on the mosque’s eastern side. The single largest pre-modern expansion came under Caliph al-Mahdi, begun in 164 AH (780–781 CE) and completed after his death by his son and successor al-Hadi: an addition of roughly 12,512 square metres, using marble columns imported from Egypt and Syria with gilded teak-wood inlay capitals, and establishing most of the named historic southern gates discussed later in this article — the Bazan Gate, the al-Baghla Gate, Bab al-Safa, the Ajyad Gate, the Gate of the Egyptian Hospice, and the Umm Hani Gate. Later, Caliph al-Mu’tadid, reigning 279–289 AH (892–902 CE), demolished the ancient Dar al-Nadwah and converted its site into a portico with six new gates opening onto the mosque, while adding twelve internal and three external doors elsewhere. By the late tenth century CE, the geographer al-Maqdisi recorded nineteen gates in total, with Bab Bani Shaybah — still, at this date, standing as it always had — singled out as the most important. Notably, the Abbasid period ends, for purposes of the mosque’s history, without any recorded major destruction; the mosque that Abbasid builders left behind was substantially the one later dynasties would restore and decorate, rather than rebuild.

Mamluk Stewardship (656–923 AH / 1258–1517 CE)

The Mamluk sultans of Egypt, who held custodianship of the Two Holy Mosques for over two and a half centuries, are recorded in the general historical literature as patrons of repair and maintenance at Masjid al-Haram — funding restoration after periodic flood and fire damage, and sending annual gifts and building materials with the Egyptian pilgrim caravan — rather than as authors of a major structural expansion comparable to the Abbasid or later Ottoman and Saudi projects. The sources consulted for this article do not document a Mamluk-era rebuilding of any specific named gate; readers should understand this as a period of continuity and maintenance for the gate arrangement established under the Abbasids, rather than a gap in the historical record.

The Ottoman Period (923–1344 AH / 1517–1925 CE)

Ottoman intervention at the mosque was extensive but was concentrated on the building’s fabric rather than its footprint. Sultan Selim II commissioned the celebrated architect Mimar Sinan to rebuild the mosque’s roof in 975 AH (1571 CE), replacing an older flat wooden roof with a series of small stone domes carried on rows of columns — work whose surviving physical traces are considered today the oldest architectural elements still visible anywhere in the mosque. Severe flooding in 1039 AH (1629–1630 CE) damaged the Kaaba itself, prompting Sultan Murad IV to undertake a major renovation: rebuilding the Kaaba, adding a stone arcade around the mosque’s perimeter, and bringing the total number of minarets to seven. The same Ottoman-era renovation programme — attributed in some gate-specific sources to “Sultan Murad Khan” working in 984 AH — refurbished the Abbasid-era southern gates named above without altering their basic footprint or names. This Ottoman-period mosque, essentially unchanged in plan since the Abbasids and richly decorated in the Ottoman idiom, is the one that survived into twentieth-century photographs and early travellers’ accounts, and it is the mosque that would be almost entirely demolished and rebuilt during the Saudi expansions that followed.

The Saudi Period: First Expansion (1344–1395 AH / 1925–1975 CE)

Following the incorporation of the Hijaz into the Kingdom of Saudi Arabia, King Abdulaziz Al Saud initiated the first Saudi expansion of Masjid al-Haram, with foundation work reported to have begun around 1375 AH (1955–1956 CE) under his son and successor King Saud, and construction continuing through the reign of King Faisal into the early 1970s. This expansion enlarged the mosque from approximately 28,000 square metres to around 152,000 square metres in the core structure — figures vary somewhat between sources depending on whether outdoor prayer areas are counted, with some totals citing an eventual combined area nearer 356,800 square metres once later phases are included — and raised the mosque’s prayer capacity toward half a million worshippers. It was this expansion that swept away the last of the Abbasid-and-Ottoman-era southern gates named above and the freestanding historic Bab Bani Shaybah arch, replacing them with a wholly new, larger, concrete-and-marble structure organised, for the first time, around a systematically numbered set of gates rather than a small number of individually named ones.

The Saudi Period: Second Expansion (1409–1414 AH / 1988–1994 CE)

King Fahd bin Abdulaziz launched the second Saudi expansion, with its foundation laid on 2 Safar 1409 AH (13 September 1988 CE). This phase added an entirely new western wing to the mosque together with a large outdoor prayer area reached through what became known as the King Fahd Gate, added eighteen further numbered gates, three new domes, roughly five hundred additional marble columns, and two new minarets, brought total minaret count to nine, and added three additional floors to sections of the building.

The Saudi Period: Third Expansion, the King Abdullah Expansion (1429 AH onward / 2008 CE onward)

The most extensive expansion in the mosque’s history — commonly called the King Abdullah Expansion — was announced in 2008 and formally launched with a foundation-stone ceremony on 19 August 2011, laid by King Abdullah bin Abdulaziz. The project, continued and accelerated after King Salman’s accession in 2015, added a large new area, most substantially on the mosque’s northern side, with total added area cited variously between roughly 456,000 and 750,000 square metres depending on which outdoor and multi-level areas are included in the count, intended to raise total capacity toward somewhere between 1.85 and 2.6 million worshippers at once, at a reported cost of approximately SR80 billion (about $21.3 billion). King Salman launched five associated megaprojects around the Haram in July 2015. Construction was formally opened for use in stages beginning in 2017, though work on ancillary elements continued for years afterward: courtyard additions were reported as complete in August 2019, minaret construction on the three main historic-named gates — Bab Abdul Aziz, Bab al-Umrah, and Bab al-Fath — proceeded between 2019 and 2023, and the broader project is reported as substantially complete by 2024. The expansion added four further minarets, two flanking the new King Abdullah Gate and one each at the mosque’s northeast and northwest corners, brought the total number of minarets to thirteen, at heights reported around 139 metres (roughly 456 feet). This phase is also the source of the current numbered gate system most visitors encounter today, discussed in detail in the Architecture and Practical Visitor Guide sections below.

Interruptions and Incidents During Construction

The King Abdullah Expansion’s long construction timeline was marked by at least one serious, widely reported incident: on 11 September 2015, a construction crane collapsed onto the mosque grounds during severe weather, killing over a hundred people and injuring hundreds more, just weeks before that year’s Hajj season. Investigations into the incident and subsequent halts to specific contractor work followed, though King Salman ordered that the mosque remain open to pilgrims for the imminent Hajj despite the damage. Later interruptions were caused by external events rather than site accidents: work slowed considerably during 2020 amid the global COVID-19 pandemic, with a gradual return to full pace only from 2021 onward, after which momentum picked up substantially through 2022 and 2023, including new licenses issued for continuing contractor work and the formal inauguration of a new Saudi-style portico by the mosque’s chief imam, Sheikh Abdul Rahman al-Sudais.

Architecture

Design Language Across the Centuries

The architectural history of the mosque’s gates is, in effect, a layered record of five distinct design languages, each imposed by a different ruling power on the same basic function — a controlled opening in a boundary wall. The earliest gates, from the Umayyad and Abbasid periods, were modest stone-and-timber openings, often no more than a simple arch, sometimes carved with Qur’anic inscriptions in an early angular script. The Abbasid-era southern gates established under al-Mahdi are recorded, in the case of Bab al-Safa specifically, as having featured five niched entrances beneath a central arch decorated with muqarnas — the stalactite-like carved stonework characteristic of high medieval Islamic architecture — with Qur’anic verses 2:158 and 3:133 inscribed above. The Ottoman period, beginning with Mimar Sinan’s roof reconstruction in 975 AH (1571 CE), introduced the domed-and-arcaded style still associated with “traditional” Haram architecture in popular imagination: rows of small stone domes on carved columns, pointed and rounded arches, and calligraphic bands in the elaborate Ottoman thuluth script. This Ottoman-era decorative vocabulary survived, largely unaltered in spirit, until the mid-twentieth century.

The Saudi expansions introduced a fourth and then a fifth design language. The first Saudi expansion under King Abdulaziz and King Saud retained a certain visual continuity with Ottoman precedent — pointed arches, extensive use of white marble, restrained calligraphic bands — while dramatically increasing scale. The King Fahd-era second expansion continued in a broadly similar, marble-heavy idiom, adding three domes and further columns in a style consistent with what had come before. The King Abdullah Expansion introduced what several architectural commentators have described as a more explicitly modern, monumental style: the rebuilt King Abdul Aziz Gate on the mosque’s western side is repeatedly described in the sources as a “drastic deviation” from the traditional Ottoman-derived Haram architecture, favouring a more square, modern profile, while the new King Abdullah Gate at the northern end of the extension is described as a scaled-up version of the King Fahd-era gate style: a triple-arched central portal flanked by two minarets, itself flanked by two smaller tetra-arched gates. Bab al-Marwah, elsewhere on the site, is specifically described as combining traditional Arab architectural elements with more modern aesthetic choices — an attempt, it appears, to bridge the older and newer design languages rather than commit fully to either.

Materials

Marble has been the dominant material in the mosque’s fabric since at least the Umayyad period, when al-Walid I is recorded as importing marble columns from Syria and Egypt. The Abbasid al-Mahdi expansion continued this pattern, adding marble columns with gilded teak-wood inlay capitals sourced from the same regions. This tradition of importing high-status stone from across the Islamic world persisted into the Ottoman period, when columns are recorded as having been sourced in part from the Shams mountain quarries, and into the Saudi period, when the King Fahd expansion alone is reported to have added approximately five hundred additional marble columns. Modern expansions have supplemented marble with reinforced concrete for structural spans that would not have been possible with traditional masonry techniques, though the visible, pilgrim-facing surfaces of the newer gates and courtyards remain heavily marble-clad, continuing — at least in surface appearance — the material identity the mosque has carried for over a thousand years.

Calligraphy and Inscription

Qur’anic calligraphy on the gates of Masjid al-Haram serves two purposes simultaneously: religious instruction and wayfinding. The historic Bab Bani Shaybah arch carried Surah al-Hijr 15:46 on its outward face and Surah al-Isra 17:80 on its inner face, as discussed in the Qur’anic Connections section above — verses chosen specifically to frame the acts of entering and leaving the sanctuary. The historic Bab al-Safa is recorded as having carried Surah al-Baqarah 2:158 and Surah Aal Imran 3:133, verses directly relevant to the Sa’i ritual that gate served. The historic Umm Hani Gate, per the Abbasid-era building record documented by Madain Project’s gate inventory, carried the opening verses of Surah al-Fath — a natural choice for a gate on the mosque’s southern, Makkah-facing side, given the surah’s association with the conquest narrative. This practice of matching a gate’s inscription to its ritual or historical function did not survive uniformly into the numbered modern gate system, where identification today relies primarily on painted or engraved gate numbers and names rather than extensive custom Qur’anic programmes, though calligraphic bands using Qur’anic text and the names of Allah remain a visual feature throughout the mosque’s interior and on several of the main gates.

Minarets

The minaret count at Masjid al-Haram has grown steadily with each expansion, functioning as a rough visual index of the mosque’s overall growth. Al-Walid I’s Umayyad-era addition is credited with the mosque’s first minaret; al-Mansur’s Abbasid expansion added a second, on the eastern side. By the time of Sultan Murad IV’s seventeenth-century Ottoman restoration, the count had reached seven, a figure that held for roughly three centuries and is still sometimes cited in older tourist literature. The King Fahd-era second Saudi expansion added two further minarets, bringing the total to nine. The King Abdullah Expansion added four more — two flanking the new King Abdullah Gate, one at the northeast corner, and one at the northwest corner — bringing the current total to thirteen, with the tallest reported at approximately 139 metres (456 feet). Minaret construction specifically on three of the mosque’s historically named principal gates — Bab Abdul Aziz, Bab al-Umrah, and Bab al-Fath — proceeded as a distinct, later phase of the King Abdullah Expansion between 2019 and 2023, reflecting how even a single, seemingly complete construction programme has in practice unfolded over more than a decade in visibly separate stages.

What Was Lost

The scale of demolition involved in the Saudi-era expansions should not be understated. The first Saudi expansion removed the entirety of the Abbasid-and-Ottoman-era southern gate complex described in the Historical Development section above — the Bazan Gate, the al-Baghla Gate, the historic Bab al-Safa, the Ajyad Gate, the Gate of the Egyptian Hospice, and the Umm Hani Gate — structures whose footprint and, in some cases, decorative inscriptions had stood for well over a millennium. The historic freestanding Bab Bani Shaybah arch, standing inside the Mataf near the Maqam Ibrahim, was demolished on 18 Rajab 1387 AH (22 October 1967 CE) specifically to clear the Mataf of above-ground obstacles as pilgrim numbers grew, as documented by Madain Project. Later phases of the King Abdullah Expansion, as tracked in official Saudi heritage summaries including Saudipedia’s account of the third Saudi expansion, required the demolition of the historic Shubaika and Shamiya neighbourhoods adjoining the mosque’s northern side in 2008, and the removal of older Ottoman-and-first-Saudi-era porticoes around 2012 to make way for the new northern structure. None of these losses are hidden in the available sources, but a visitor relying only on the mosque as it appears today would have no way of knowing, without being told, that a small stone arch with two Qur’anic verses inscribed on it once stood a few metres from where they are now standing to perform tawaf.

Archaeological Findings

Formal, peer-reviewed archaeological excavation at Masjid al-Haram itself is essentially unpublished in the open academic literature available to this research. Unlike sites such as Qubaa or the early Islamic settlements around Madinah, where some archaeological survey work has been published, Masjid al-Haram’s continuous religious use, its position at the centre of an active, continuously rebuilt city, and the government’s approach to construction and heritage management around the site mean that systematic, published archaeological reporting on the successive gate structures described in this article — comparative dating of foundations, material analysis of the demolished Abbasid-era gates, or documentation of what (if anything) was recovered during twentieth-century demolition work — was not located during the research for this article. Architectural historians and heritage documentation projects, most notably Madain Project, have compiled detailed textual and photographic histories of specific structures such as Bab Bani Shaiba, drawing on classical Arabic geographical and historical writing (al-Maqdisi, and later Ottoman and Hijazi chroniclers) rather than on excavation. Readers should therefore understand the architectural history recounted in this article as resting on documentary and photographic evidence, and on the physical evidence of surviving Ottoman-era elements such as Mimar Sinan’s domes, rather than on published stratigraphic or excavation archaeology, and should treat any claim of a specific “archaeological find” relating to the mosque’s gates with caution unless it can be traced to a named excavation report.

Stories of the Companions

Uthman ibn Talha and the Weight of a Key

Uthman ibn Talha ibn Abi Talha al-Abdari, of the Banu Shaybah clan, held the key of the Kaaba at the time of the conquest of Makkah, having inherited the role from his forebears in an unbroken custodial line reaching back to the pre-Islamic period. His personal story is one of gradual, then decisive, conversion: he is recorded as having initially refused the Prophet ﷺ entry to the Kaaba on an earlier occasion before the conquest, only to hand over the key voluntarily, and ultimately to embrace Islam himself, once the city fell and the Prophet ﷺ chose — rather than seizing the honour for his own family — to restore the custodianship to Uthman’s clan permanently. It is worth being honest about the limits of certainty here: sources differ on the precise sequence and date of Uthman ibn Talha’s own conversion relative to the conquest, and this article does not assert a single, definite timeline beyond what is recorded in the key-handover narrative itself, graded Hasan as discussed above.

Bilal ibn Rabah: Present at the Threshold

Bilal ibn Rabah, the Abyssinian former slave freed by Abu Bakr and the first person to call the adhan in Islam, is named directly in the authentic hadiths describing the Prophet’s ﷺ entry into the Kaaba on the day of the conquest — present alongside Usama ibn Zayd and Uthman ibn Talha, standing at the door, and later reporting to Abdullah ibn Umar exactly where and how the Prophet ﷺ had prayed inside (Sahih al-Bukhari 440). Bilal’s presence at this threshold moment — literally standing at the door of the Kaaba as the man who would, within Islamic memory, become the archetype of the freed believer restored to full dignity by faith — gives an added layer of significance to the gate later named in his honour, Bab Bilal, on the mosque’s southern facade, even though that specific numbered gate is a twentieth-century Saudi-era structure rather than a direct architectural descendant of anything from his own lifetime.

Usama ibn Zayd: The Youngest Witness

Usama ibn Zayd, son of the Prophet’s ﷺ close companion Zayd ibn Harithah and among the youngest people present at the conquest, rode behind the Prophet ﷺ into Makkah and entered the Kaaba with him, Bilal and Uthman ibn Talha, per the authentic account in Sahih al-Bukhari (Sahih al-Bukhari 440). His presence is a reminder that the small group inside the Kaaba on that historic day was not composed exclusively of senior tribal leaders or the oldest companions; it included a young man whose father had been freed from slavery and adopted into the Prophet’s ﷺ own household, standing at the very centre of the moment the sanctuary was reclaimed for monotheism.

Companions Who Were Not There

In keeping with the honesty this article aims for throughout, it is worth being explicit about who was absent from the specific moments described above. Abu Bakr, though present in Makkah during the conquest and central to the wider campaign, is not named in the specific hadith describing entry into the Kaaba’s interior — that moment is reserved, in the authentic reports, for Usama, Bilal and Uthman ibn Talha alone, with the Prophet ﷺ. Umar ibn al-Khattab, whose own name would later be given to the mosque’s very first enclosing wall, is likewise not recorded as one of the small group who entered the Kaaba’s interior on the day of the conquest — his defining architectural contribution to the sanctuary came six years later, in his own caliphate, not on this day. Ali ibn Abi Talib, though prominent throughout the Makkan campaign and the namesake of the modern Bab Ali, is also not named among those who entered the Kaaba’s interior in the specific hadith discussed above; his most famous personal connection to the Kaaba’s interior belongs instead to an earlier episode, his birth, which some traditions locate inside the Kaaba itself, though this specific claim is treated by many historians as a later devotional tradition rather than a matter of certain historical record, and is not asserted here as established fact.

Stories of Great Islamic Scholars

Malik ibn Anas and the Sanctity of the Precinct

Imam Malik ibn Anas, founder of the Maliki school and a lifelong resident of Madinah, is recorded in numerous transmissions as holding the sanctity of the Two Holy Mosques in such profound reverence that he reportedly refused to ride an animal within the precincts of Madinah out of respect for the ground where the Prophet ﷺ had walked — an attitude of physical deference to sacred space that, applied to Makkah, underlies much of the classical fiqh literature’s careful attention to exactly how a person should comport themselves on entering Masjid al-Haram: with the right foot first, with the general mosque-entry dua, and, in the specific case of tawaf-intending visitors, without unnecessary delay before beginning the rite.

Ibn Taymiyyah on Gate-Specific Practices

Ibn Taymiyyah, the Hanbali jurist whose writings form a major reference point for later Salafi-oriented scholarship on innovation (bid’ah) in worship, is the intellectual ancestor of the position — reiterated in the modern era by the Saudi Permanent Committee discussed above — that specific, invented practices attached to particular locations within or around a sanctioned ritual, without basis in the Prophet’s ﷺ own established practice, should not be treated as religiously required or specially rewarded. While this article did not locate a text from Ibn Taymiyyah addressing Bab al-Salam or Bab Bani Shaybah by name specifically, his broader jurisprudential framework — distinguishing between the core, textually established rites of Hajj and Umrah and the accumulated local customs that surround them — is the framework modern scholars explicitly invoke when addressing the question of whether a specific entry gate carries independent merit, and this article’s treatment of that question in the Common Misconceptions section below follows that same jurisprudential logic.

Ibn Kathir and al-Tabari on the Gate Verses

The two verses inscribed on the historic Bab Bani Shaybah arch — Surah al-Hijr 15:46 and Surah al-Isra 17:80 — are both addressed in the major classical tafsir works. Ibn Kathir’s commentary on al-Hijr 15:46 situates the verse within Allah’s description of the reward of the righteous in Paradise, read by the angels as a greeting of peace and security; his commentary on al-Isra 17:80 links the verse’s language of “a secure entrance and a secure exit” to accounts of the Prophet’s ﷺ own migration, while noting that other early exegetes read the verse more broadly as covering any significant transition undertaken with sincere intention. Al-Tabari’s earlier tafsir preserves multiple transmitted opinions on the same verses, reflecting the normal pattern of early Qur’anic commentary in offering several plausible readings rather than a single fixed interpretation — a pattern this article’s Qur’anic Connections section above tries to reflect honestly rather than flattening into one authoritative reading.

Al-Samhudi and the Documentary Tradition

Nur al-Din al-Samhudi, the fifteenth-century historian best known for his monumental history of Madinah, Wafa’ al-Wafa, belongs to a broader tradition of meticulous topographical and historical documentation of the Two Holy Mosques that also produced al-Maqdisi’s tenth-century account of Masjid al-Haram’s nineteen gates, cited repeatedly in this article. While al-Samhudi’s own primary subject was Madinah rather than Makkah, the method he represents — careful, source-critical compilation of earlier historians’ and geographers’ accounts of a sacred site’s physical development — is precisely the method this article has tried to rely on wherever possible for the history of the Makkan gates, and modern reference projects such as Madain Project continue that same documentary tradition using digital and photographic tools unavailable to earlier scholars.

The Modern Fiqh Committees

In the absence of a single named classical jurist who wrote at length specifically on the merit or otherwise of particular Haram gates, the most directly relevant scholarly voices on this exact question are modern: the Permanent Committee for Islamic Research and Issuing Fatwas in Saudi Arabia, whose ruling on Bab al-Salam is cited above and discussed further in the misconceptions section, and individual contemporary scholars such as Sheikh Muhammad ibn Salih al-Uthaymin, whose recorded commentary distinguishes between an act being sunnah maqsudah — a practice the Prophet ﷺ specifically intended and sought out — and an act that merely happened, incidentally, to occur in a particular place because of the practical layout of the mosque in his own time, without that placement itself carrying independent religious significance for later generations facing a completely rebuilt and differently arranged mosque. This distinction, though technical, is the single most important scholarly tool for understanding what can and cannot be claimed about gate-specific merit at Masjid al-Haram today, and it recurs throughout the remainder of this article.

Spiritual Reflection

Stand for a moment, before you go, at whichever gate you plan to use, and consider what that threshold has meant to the people who crossed it before you. You are not the first person to feel your pulse rise in the last few metres before the Kaaba comes into view. Fourteen centuries of pilgrims have stood roughly where you are standing, waiting for a crowd to thin, adjusting a bag, saying the same words you are about to say. The gate itself has almost certainly changed since any of them passed through — rebuilt, renumbered, moved a few metres in one direction or another — but the moment has not changed at all. You are about to ask Allah, in words the Prophet ﷺ himself used, to open for you the doors of His mercy (Sahih Muslim 713). Say it and mean it. It costs nothing to say and it is available to you at every one of the more than two hundred gates in this mosque, not only at the ones with famous names.

Ask yourself, as you walk in, why you are really here. Is it because you wanted to see the Kaaba with your own eyes at least once, the way millions of people do — or is there something specific weighing on you that you have been carrying for months, something you have not said out loud to anyone? This building has absorbed more grief, more gratitude, more desperate whispered requests than any other single structure on earth. Nobody checks your reasons at the door. The gate does not care whether you arrive broken or grateful or simply curious. It will let you through either way, and what happens after that is between you and Allah.

Notice, too, what it took to get you to this door. Somebody, generations ago, decided this ground was worth protecting and paid for a wall. Somebody else, centuries later, decided the wall needed to be bigger, and pulled down houses to make room. A king you may never think about again spent billions of riyals moving a mountain of concrete and marble so that you, specifically, would have a gate wide enough to walk through without being crushed. None of that labour was for you personally — and all of it was, in the sense that every expansion since Umar’s has been undertaken explicitly to make room for whichever pilgrim would come next. You are the pilgrim they were building for. Walk through with that in mind, and let the walk from the gate to the Kaaba be unhurried, even if the crowd around you is not.

Before you reach the Mataf, make this dua your own, in whatever language you pray in: ask for a secure entrance and a secure exit, the way the Qur’an itself teaches — “My Lord, cause me to enter a secure entrance and to exit a secure exit and grant me from Yourself a supporting authority” (Surah al-Isra 17:80). Ask that this visit change something in you that needs changing. Ask that when you leave — through this gate or another, it genuinely does not matter which — you leave lighter than you arrived.

Practical Visitor Guide

Read This Before You Fly

Everything specific in this section — gate numbers, distances, which entrances lead where — reflects the best information available as of mid-2026, drawn from official Saudi government sources, the Madain Project architectural reference, and pilgrim-facing tour operators, cross-checked against each other. The Grand Mosque has been under continuous, overlapping construction for close to two decades, and gate numbers and locations have changed multiple times within that period. Treat every number below as a strong, well-sourced starting point, not a guarantee. On arrival, verify the current arrangement in three ways: check the official Saudi Ministry of Hajj and Umrah website and its published visitor guides for the current season; ask staff at your hotel, who deal with the current layout daily; and, most reliably, simply look up at the illuminated gate number and name plate above whichever entrance you are standing at — these are kept current even when guidebooks are not.

The Five Main Gates and the Numbering System

The modern mosque uses a sequential numbering system, with gate numbers generally increasing as you move around the building. Five gates are treated as the mosque’s principal entrances, and are the ones named on official signage, in the Ministry of Hajj’s own visitor literature, and in most transport and hotel directions: King Abdul Aziz Gate (Gate 1), at the Yemeni corner facing Ajyad Street; Al-Fath Gate (Gate 45), on the southern side; Umrah Gate, numbered Gate 62 in the Ministry of Hajj’s own official Umrah Guide for Domestic Pilgrims though frequently cited as Gate 63 in tour-operator literature — a discrepancy worth being aware of rather than a sign either source is unreliable; King Fahd Gate (Gate 79), on the eastern edge; and King Abdullah Gate (Gate 100), the central entrance to the northern extension built during the King Abdullah Expansion. These five gates are generally the widest, the most heavily signed, the most likely to have step-free access, and the ones taxi and rideshare drivers will recognise immediately if you cannot remember a smaller gate’s number.

Beyond these five, sources differ noticeably on the total number of gates now in use — figures cited include 210 in several tour-operator and reference compilations, and as many as 262 following the completion of the King Abdullah Expansion according to Madain Project’s gate inventory, with roughly thirteen of these specifically designated for wheelchair and disability access. This discrepancy is itself a useful piece of practical information: it tells you that even specialist, well-informed sources cannot currently agree on an exact figure, which is a direct consequence of how much the building has changed and continues to change. Do not be alarmed if the number you read in one place does not match the number you read in another; treat both as approximately, not precisely, correct.

Remembering Your Entry Point — the Single Most Useful Habit

The most common way pilgrims get lost or separated at Masjid al-Haram is simple: they enter through one gate, spend hours inside moving through a crowd with no fixed reference points, and then cannot find their way back to the specific door they came in through, especially if travelling with family members who may exit at a different point. The single most useful habit you can build, before you even reach the mosque, is deliberately memorising your entry gate by number and by a nearby landmark, not just by general direction. Say the gate number out loud to your group before you separate. Photograph the illuminated gate sign with your phone the moment you walk in — it takes two seconds and gives you a searchable, undeniable reference point later, including the exact spelling of the gate’s name, which is often more useful than the number when asking mosque staff or police for directions, since not everyone uses the numbering system fluently. If you are travelling with elderly relatives or young children, agree in advance on a fixed meeting point at a specific gate and a specific, nameable feature near it — a particular shop, a particular pillar, a specific staircase — rather than a vague “outside the mosque,” which is meaningless in a crowd of hundreds of thousands.

Columns and Pillars as Wayfinding Tools

Inside the mosque, especially in the older first- and second-expansion areas, the marble columns supporting the roof are numbered, and this numbering is one of the most underused wayfinding tools available to visitors. If you know or can note the number of the column nearest to where you plan to pray or where you leave a bag, you have a fixed, unambiguous reference point that does not depend on crowd-dependent landmarks like “near the escalator,” which may be surrounded by hundreds of indistinguishable people at any given moment. Many long-term visitors and local guides recommend this specifically for women’s prayer groups and for elderly pilgrims who pray in the same general area on multiple visits: note the column number once, and you have a repeatable, communicable location for every future prayer at that spot.

Shoe Racks: Useful, But Do Not Rely on Them Alone

Masjid al-Haram provides shoe racks near most gates, each rack fitted with a unique number specifically so that pilgrims can memorise or note their rack number and retrieve the correct pair later. In practice, the racks are heavily used, and shoes are sometimes moved, knocked down, or picked up by mistake by other worshippers during the crush around prayer times, so treat the number system as helpful rather than fully reliable. Two better strategies, both widely recommended by experienced pilgrims: first, carry your shoes with you in a small plastic or cloth bag rather than leaving them on a rack at all — volunteers distribute free plastic bags at many of the main gates specifically for this purpose, though supply is limited and unpredictable during busy periods, so it is worth bringing your own reusable bag from your hotel; second, if your shoes are lost or taken, inexpensive replacement flip-flops are sold by shops immediately outside most major gates for a small number of riyals, so a lost pair of shoes is an inconvenience, not a crisis. Unlike Masjid an-Nabawi in Madinah, which has some shoe storage available outside the building as well as inside, Masjid al-Haram’s shoe racks are generally located just inside the gates rather than outside them.

Toilets and Wudu Facilities

There are no public toilets inside Masjid al-Haram itself; you must exit the building to reach one. Wudu (ablution) stations, however, are available inside the mosque, typically located near the main entrances to the Mataf area and near the major escalator and staircase clusters, and are usually marked with signage distinguishing men’s facilities from women’s, with women’s wudu areas typically curtained for privacy. Outside the building, toilet facilities are concentrated near the major gates: near the King Abdul Aziz Gate (Gate 1), near the Marwah Gate area, and near the historic Safa Gate cluster (Gates 11 and 12). In the basement level near the Clock Tower complex, toilet blocks are numbered (commonly referenced by pilgrims as WC3 and WC4 near Gates 93 and 94, and WC6 for men and WC7 for women between the Clock Tower and the Dar Al Tawhid area), and a similar numbered pairing exists near the King Fahd Gate. If you have young children, elderly relatives, or anyone with an urgent or unpredictable need to use a toilet, plan your position inside the mosque with a nearby exit gate in mind before you settle in for a long prayer session, since the walk back out through a dense crowd can take considerably longer than expected.

Zamzam Water

Chilled Zamzam water is available throughout the mosque from large dispensers and coolers positioned at regular intervals, including near most of the main gates and throughout the prayer halls on multiple floors, with disposable cups provided at each station. There is no need to seek out one particular gate for Zamzam access, since dispensers are deliberately distributed across the entire building precisely so that no single point becomes a bottleneck; the practical advice here is simply to carry your own reusable bottle if you want to take water with you as you move through the mosque, since queuing at dispensers during peak prayer times can be slow.

Wheelchair, Cart, and Mobility Access

Of the mosque’s gates, thirteen are specifically designated as accessible for wheelchair users and people with limited mobility, according to Madain Project’s gate inventory, with ramps rather than stairs at these points. The King Abdul Aziz Gate (Gate 1) offers direct wheelchair access to the outer Mataf area and is among the most commonly used accessible entrances given its proximity to the Clock Tower hotel complex. Several gates on the mosque’s southern and western sides — including gates associated with companions’ names such as Muadh bin Jabal, Khadijah, and Ibrahim — are specifically noted in tour-operator accessibility guides as ramp-equipped. The mosque also operates electric cart services for elderly and disabled pilgrims on certain routes, particularly around the Mas’a between Safa and Marwah, and pilgrims requiring this service should ask mosque staff or their tour operator about current cart routes and pickup points on arrival, since these services are adjusted seasonally based on crowd volume.

Women’s Prayer Areas

Dedicated women’s prayer areas exist on the first floor within the King Fahd-expansion section of the mosque, and a smaller, often quieter women’s prayer area is located behind the Maqam Ibrahim, close to the Kaaba itself, which some experienced visitors recommend specifically for off-peak hours because of its proximity to the Mataf without requiring a woman to navigate the main crowd flow. During Ramadan and Hajj, when capacity is stretched to its limit, rooftop prayer areas are opened, including for women, though these areas offer little shelter from direct sun and heat and should be used with sun protection and hydration in mind. Several gates are specifically associated with women’s access: Gate 84 (Bab Jabir bin Abdullah) is reserved exclusively for women according to Madain Project’s inventory, and a cluster of gates reached via the King Fahd Gate and a subsequent turn — commonly cited as gates 84 through 87 — are informally referred to by pilgrims and guides as the “ladies’ gates,” though as with all specific gate numbers in this article, this arrangement should be confirmed with mosque signage or staff on arrival, since seasonal reallocation of specific areas by gender is common during high-occupancy periods.

Nearest Gates to Major Hotels and the Clock Tower

For pilgrims staying at the Abraj Al Bait complex — the Clock Tower development that dominates the skyline immediately beside the mosque — the nearest and most direct entrance is the King Abdul Aziz Gate (Gate 1), located directly opposite the complex at a distance of roughly 300 to 350 metres, a walk of some five to eight minutes according to Discover Makkah, the official Saudi tourism authority’s guide to Abraj Al Bait. For pilgrims staying at the Dar Al Tawhid InterContinental Makkah, the nearest entrance is the King Fahd Gate (Gate 79) and the adjoining Gate 74, at a distance of approximately 120 metres. If you are choosing a hotel primarily for ease of access to the mosque, ask specifically which numbered gate the property considers its nearest entrance, since hotel marketing materials sometimes describe proximity to “the Haram” in general terms without specifying which of the more than two hundred gates that actually means in practice — a difference that can add fifteen or twenty minutes of walking around the building’s perimeter if you guess wrong.

Prayer-Time Crowd Behaviour and Gate Closures

Gates are routinely closed to new entrants approximately one hour before each of the five daily prayers, and reopen roughly thirty minutes after the prayer concludes, in order to manage the safe movement of the enormous crowds converging on the mosque at these times. If you arrive during a closure window, you will typically be directed to pray outside the mosque in designated overflow areas, usually marked with temporary barriers, rather than being allowed to force entry — this is a safety measure, not an inconsistency in the rules, and pushing against it will not help you get inside faster. Random bag checks by security staff are routine at every gate and should be expected as a normal part of entry, not a sign of being specifically targeted; arriving with slightly more time than you think you need, especially during Ramadan or Hajj season, absorbs this delay comfortably.

Best Gates to Use at Peak Times

During the highest-density periods — the last ten nights of Ramadan, the days surrounding Hajj, and Friday congregational prayers — the five main gates (1, 45, 62, 79 and 100) will be the most crowded, precisely because they are the best known and the most heavily signed. Experienced pilgrims and local guides often recommend using one of the less well-known numbered gates on the mosque’s northern or western flanks during these peak windows specifically because crowd pressure is measurably lower at less iconic entrances, even though the walk from a hotel may be a few minutes longer. If your priority is speed and comfort of entry rather than symbolic significance, ask your hotel concierge or tour guide which specific gate is currently running lightest at your intended prayer time — this changes hour to hour and is something local staff track far more accurately than any published guide can.

Luggage and Bag Storage

Designated luggage storage areas are located near Gate 1 (beside a nearby toilet block), near Gate 79, opposite Gate 64 in the mosque’s western courtyard, and near the Makkah Library in the eastern courtyard. These are useful if you plan to visit the mosque directly after arriving in the city, before checking into a hotel, and do not want to carry full luggage through the crowd.

Visiting with Children

If you are visiting with young children, agree on a specific, memorable meeting point — ideally a named gate and a specific nearby feature, per the wayfinding advice above — before you enter, and consider writing your hotel name and phone number on a card in the child’s pocket. The scale of the crowd at Masjid al-Haram, especially during Ramadan and Hajj, is genuinely difficult to appreciate until you have experienced it, and small children can become separated from a parent within seconds even in a deliberately careful family group.

Photography and Etiquette

Photography for personal, non-commercial purposes is generally tolerated throughout the mosque, though visitors should avoid photographing other worshippers, particularly women, without consent, and should be especially mindful near prayer areas during active prayer times. Commercial filming requires separate permission from the relevant Saudi authorities. As with any mosque, modest dress is expected of all visitors regardless of nationality, and the general etiquette of entering with the right foot first and reciting the mosque-entry dua discussed above applies equally at every one of the mosque’s gates.

Common Mistakes Visitors Make at the Gates

The most common practical mistakes are, in rough order of frequency: failing to note the entry gate number and becoming unable to relocate it later; assuming a specific gate (most often Bab al-Salam) must be used and wasting time and energy crossing a crowded mosque perimeter to reach it, when any gate is religiously sufficient, a point addressed at length in the Common Misconceptions section below; leaving valuables or shoes unattended without a numbered rack or a bag, and then being unable to identify them later; underestimating how far the walk is between a hotel and a specific numbered gate when the hotel’s own marketing described it only as “near the Haram”; and arriving right at the edge of a prayer-time closure window without allowing buffer time, leading to an unplanned wait outside in direct sun.

Practical Visitor Guide: Additional Detail

Verifying the Current Layout Before You Travel

Beyond the three verification methods already given in this article — the official Ministry of Hajj and Umrah website, hotel staff, and on-site signage — pilgrims travelling with an organised group or tour operator should ask their operator directly, before departure, for the current recommended entry and exit gates for their specific hotel, since experienced operators update this information seasonally based on which sections of the mosque are open, under renovation, or subject to temporary crowd-management restrictions. Independent travellers booking accommodation directly should specifically request, in writing, the name and number of the nearest mosque gate from the property, rather than accepting a general claim of proximity “to the Haram,” for the reasons discussed above regarding the sometimes significant walking distance difference between adjacent but differently numbered entrances.

Seasonal Variation in Gate Use

The gates that function well for casual, low-crowd visits outside of Ramadan and Hajj are not always the same gates that function well during those peak periods. Several gates that serve as convenient, quiet entrances during the ordinary months of the year become bottlenecks during Ramadan’s last ten nights or during Hajj, precisely because everyone who knows about them uses them simultaneously; conversely, some of the newer gates within the King Abdullah Expansion’s northern extension, less familiar to long-time visitors and therefore less crowded by habit, can offer significantly smoother access during peak periods for those willing to walk a little further from their hotel. This is a further reason the advice given earlier in this article — ask current, local staff which specific gate is running lightest at your particular prayer time — is more valuable than any fixed, published recommendation, including this one.

A Final Word on Patience

Whichever gate you use, and whatever this article’s specific numbers and distances turn out to look like by the time you actually travel, the underlying reality will not have changed: you will be one of an almost incomprehensibly large number of people trying to reach the same building at the same time, walking through infrastructure that has been rebuilt, at enormous expense and effort, specifically to make that possible without catastrophe. Delays, closures, and crowding are not signs that something has gone wrong. They are the ordinary, expected cost of a sanctuary designed to hold millions of people rather than thousands, and every gate discussed in this article — from the vanished freestanding arch of Bab Bani Shaybah to the newest minaret-flanked entrance of the King Abdullah Gate — exists because some ruler, at some point in fourteen centuries of history, decided that cost was worth bearing so that the next pilgrim could get through.

Common Misconceptions

Misconception: A Pilgrim Must Enter Through a Specific Gate

This is, by a wide margin, the most common and most consequential misconception addressed in this article, and it deserves to be stated plainly: there is no requirement, in any authentic hadith or in the rulings of mainstream fiqh committees, that a person performing Hajj or Umrah must enter Masjid al-Haram through Bab al-Umrah, Bab al-Salam, or any other single named or numbered gate. The Saudi Permanent Committee for Islamic Research and Issuing Fatwas addresses this directly: “Some people think that it is essential for the pilgrim doing Hajj or Umrah to enter through a specific gate of al-Masjid al-Haraam… Others think that they must enter through Bab al-Salaam, and that entering through any other gate is a sin or is makrooh. There is no basis for this. The pilgrim doing Hajj or Umrah may enter through any gate” (Islam Question and Answer, fatwa 34869, citing the general mosque-entry etiquette of Sahih Muslim 713). This is graded here as a Scholarly opinion representing settled, mainstream fiqh consensus rather than a matter of continuing dispute among the major schools. A related, more specific ruling from the Permanent Committee — whose members at the time included Sheikh Ibn Baz, Sheikh Abdul Razzaq Afifi, and Sheikh Abdullah ibn Qa’ud — states explicitly that it is not obligatory to enter specifically through Bab al-Salam, available in full at Islam Question and Answer, fatwa 109317.

A note on authenticity: the underlying practice of many pilgrims seeking out Bab al-Salam specifically, or historically Bab Bani Shaybah, is a genuinely old and widespread custom, and this article does not dismiss it as inherently wrong to follow if a person wishes to. What is not established is that doing so is religiously obligatory, or that skipping it constitutes any kind of shortfall in a person’s Hajj or Umrah. The distinction scholars draw — following the framework associated with Ibn Taymiyyah and applied explicitly by Sheikh Muhammad ibn Salih al-Uthaymin — is between a practice the Prophet ﷺ deliberately sought out as a matter of sunnah (sunnah maqsudah) and a practice that occurred incidentally because of the mosque’s layout in his own time, without independent religious weight attaching to the specific location itself, especially given that the mosque has been rebuilt so extensively that the original location no longer corresponds to any single gate in use today.

Misconception: Bab al-Salam Is the Same Place as the Historic Bab Bani Shaybah

This misconception deserves its own separate treatment because it is so easily and so commonly made, including in guidebooks that should know better. The historic Bab Bani Shaybah was a small, freestanding stone arch standing inside the Mataf, just east of the Maqam Ibrahim, never part of any perimeter wall, demolished on 18 Rajab 1387 AH (22 October 1967 CE) specifically to clear space in the Mataf, according to the detailed architectural history compiled by Madain Project. The gate that today carries a similar name, numbered Gate 22 in the current system and located near Mount Marwah on the mosque’s eastern flank, occupies an entirely different position in a completely rebuilt building, and is a twentieth-century Saudi-era structure with no direct physical continuity to the historic arch beyond the shared clan name. Likewise, “Bab al-Salam” as used colloquially by many pilgrims and tour operators today typically refers to an entrance near the Marwah side of the mosque, used traditionally by many as an entry point associated with beginning Umrah — but this modern usage and location should not be conflated with the specific historic freestanding arch inside the Mataf that al-Maqdisi, writing in the tenth century, considered the most important of the mosque’s nineteen gates. Treat “Bab al-Salam” as a name that has been attached, at different points in history, to more than one physical location, and treat any claim that today’s Bab al-Salam is architecturally identical to the historic Bab Bani Shaybah with real skepticism.

Misconception: Greeting the Mosque Always Means Performing Tawaf

A related and equally common misunderstanding holds that the “greeting” prayer required of anyone entering any mosque — the two rak’ahs discussed in the Hadith References section above (Sahih al-Bukhari 444; Sahih Muslim 714) — is, at Masjid al-Haram specifically, always replaced by tawaf, such that every single person who enters the mosque for any reason at all is performing an act of worship simply by walking in, without any further intention required. The Permanent Committee addresses this directly: “Some people… mistakenly believe that the greeting for al-Masjid al-Haraam is tawaaf, in the sense that it is Sunnah for everyone who enters al-Masjid al-Haraam to do tawaaf… In fact this is not the case. Al-Masjid al-Haraam is like all other mosques” with respect to the general requirement (Islam Question and Answer, fatwa 34869). The correct, narrower scholarly position — held by a number of jurists and reflected in this same fatwa — is that tawaf substitutes for the two-rak’ah greeting specifically and only when a person enters with the intention of performing tawaf, whether obligatory or voluntary; a person entering the mosque for some other purpose, without the intention to circle the Kaaba, still owes the mosque the ordinary two-rak’ah greeting like any other mosque. This is graded a Scholarly opinion, representing the mainstream position on a matter where the underlying practice — tawaf as an act of worship — is of course itself extremely well established and authentic in its own right; what is corrected here is only the overly broad claim that entry itself, regardless of intention, automatically constitutes worship.

Misconception: Specific Du’as Are Prescribed for Specific Gates

A number of pilgrim guides, phrasebooks and informal oral traditions attach specific supplications to specific named gates — a particular dua said only at Bab al-Salam, another said only at Bab al-Fath, and so on, often presented as though these were transmitted directly from the Prophet ﷺ. No such gate-specific dua appears in the major hadith collections consulted for this article. What is authentically established is the single, general mosque-entry dua recorded in Sahih Muslim, applicable at every gate without distinction: “O Allah, open for me the doors of Your mercy” (Sahih Muslim 713), together with the ordinary Islamic greeting on entering any space and the sending of blessings upon the Prophet ﷺ, as noted in the Permanent Committee’s guidance (Islam Question and Answer, fatwa 34869). Any dua presented to you as specific to one named gate, without an accompanying hadith reference, should be treated as Fabricated (mawdu’) or, at best, as a well-meaning but unsubstantiated local custom, and should not be treated as a religious obligation. This does not mean such duas are forbidden to say privately as personal supplication — a Muslim may ask Allah for anything, anywhere, in their own words — but it does mean they should not be presented or believed as transmitted sunnah.

Misconception: The Conquest-Era and Farewell-Umrah Gate Traditions Are Documented Hadith

As discussed in the sections on the Prophet ﷺ and this place, and on named historic gates, the popular traditions associating Bab al-Fath specifically with the Prophet’s ﷺ entry at the conquest, and Bab al-Umrah specifically with his final Umrah, are widely repeated in guidebooks and by on-site guides, and this article has told them because they are a genuine, longstanding part of the site’s living memory. However, careful checking against the wording of the authentic hadiths describing the conquest (Sahih al-Bukhari 4290) shows that these hadiths describe the Prophet’s ﷺ entry into the city of Makkah as a whole, through the northern high ground called Kada, at a date before the mosque had the walled, gated perimeter that would later carry these names. The specific identification of a modern-named gate with either of these events should be understood as a Scholarly opinion and popular tradition built on plausible topographical inference across many centuries, not as a claim directly stated in the primary hadith texts themselves.

Misconception: The Mosque Has Always Had the Same Number of Gates

Some visitors, encountering the modern numbered system running past Gate 100 and beyond, assume this reflects some ancient or fixed arrangement. In fact, as the Historical Development section above demonstrates at length, the number and arrangement of gates has changed with essentially every major building phase: nineteen gates by al-Maqdisi’s tenth-century count, an unknown but presumably smaller number in the earliest Rashidun-era walled mosque, and successively larger, differently organised numbered systems through each of the three major twentieth and twenty-first century Saudi expansions. The current system, with numbers reaching past 100 and total gate counts cited between 210 and 262 depending on the source, is a recent, still-evolving arrangement rather than a historic constant.

Lesser-Known Facts

The Banu Shaybah clan’s descendants continue, to this day, to take part in the ceremonial cleaning of the Kaaba’s interior, greeting invited guests at the door in a practice directly continuous with the Prophet’s ﷺ own instruction to their ancestor Uthman ibn Talha, as documented by Madain Project — making the custodianship of the key one of the very few institutions in the world with a continuously documented lineage of responsibility stretching back to a specific instruction given by the Prophet ﷺ himself.

The historic Bab Bani Shaybah arch reached approximately eight metres in height at its peak and rested on two square stone columns, according to Madain Project’s architectural record — meaning that for most of Islamic history, the “most important gate” of the sanctuary, per al-Maqdisi’s own tenth-century assessment, was smaller than a single modern minaret’s base.

Several of the mosque’s historic gates carried inscriptions naming their function or dedicating the structure, a practice not consistently continued on the modern numbered gates: the historic Umm Hani Gate carried the opening verses of Surah al-Fath, while the Gate of the Egyptian Hospice, also called Bab al-Takkiya, is separately recorded as having carried an inscription of verse 50 of Surah ar-Rum.

The gate numbering system in use today is not continuous around the building’s perimeter in a simple clockwise or anticlockwise loop; numbers are grouped by expansion phase and by functional zone — women’s courtyard entrances, for instance, are clustered in specific number ranges (commonly cited around 320–348) distinct from the general perimeter gates — meaning that adjacent physical gates do not always carry adjacent numbers, a detail that surprises many first-time visitors trying to navigate by number alone.

Some gates are reserved for specific, narrow functions rather than general entry: Gate 84 is designated exclusively for women according to Madain Project’s inventory, while several other gates are primarily used for roof access rather than ground-floor entry during overflow periods.

The historic gates established under Caliph al-Mahdi in 164 AH were not demolished and rebuilt until the twentieth century — meaning that for well over a thousand years, from the Abbasid caliphate through the entire Ottoman period, pilgrims used essentially the same footprint of southern gates, renovated but not fundamentally rebuilt, a continuity almost impossible to find anywhere else in a building this heavily used.

The 2015 crane collapse, which killed more than a hundred people just weeks before that year’s Hajj, occurred during a construction phase of the very expansion that produced the gate numbering system most pilgrims use today — a sober reminder that the convenience of a wide, well-signed modern gate has, in at least one documented case, come at a significant human cost during construction.

Despite the scale of the numbered modern system, at least one source, Saudipedia, cites a figure of 188 entrances specifically within the northern expansion area alone, a number that on its own would exceed the entire gate count of the pre-Saudi-expansion mosque several times over — illustrating just how much the sheer quantity of access points has grown relative to the mosque’s earlier history.

Timeline

Pre-Islamic era: The Kaaba stands with no enclosing wall; the sanctuary boundary is understood by custom, not architecture; the Kaaba’s key is held hereditarily by the Banu Shaybah clan.

8 AH (630 CE): The conquest of Makkah. The Prophet ﷺ enters the city through Kada, in its upper part (Sahih al-Bukhari 4290). He enters the Kaaba with Usama ibn Zayd, Bilal, and Uthman ibn Talha (Sahih al-Bukhari 440), then returns the Kaaba’s key permanently to the Banu Shaybah clan.

10 AH (632 CE): The Farewell Pilgrimage. The Prophet ﷺ performs tawaf, prays at the Maqam Ibrahim, and “goes out of the gate to al-Safa” en route to the Sa’i (Sahih Muslim 1218).

17 AH (638 CE): Caliph Umar ibn al-Khattab builds the mosque’s first enclosing wall, creating formal gates for the first time.

26 AH (647 CE): Caliph Uthman ibn Affan expands the mosque and introduces covered porticoes with marble columns.

64 AH (683–684 CE): Abdullah ibn al-Zubayr rebuilds the Kaaba after fire damage during the siege of Makkah and expands the surrounding mosque.

74 AH (693 CE): Al-Hajjaj ibn Yusuf, on behalf of Caliph Abd al-Malik ibn Marwan, reverts the Kaaba to its earlier form; Abd al-Malik later renovates the mosque’s walls.

Early 8th century CE: Caliph al-Walid I extends the mosque’s wings, adds a minaret, and imports marble columns from Syria and Egypt.

137–140 AH (754–757 CE): Caliph al-Mansur expands the mosque and adds a minaret on its eastern side.

164 AH (780–781 CE) onward: Caliph al-Mahdi begins a major expansion, completed by his son al-Hadi, establishing the named southern gates that will stand for over a millennium.

279–289 AH (892–902 CE): Caliph al-Mu’tadid demolishes Dar al-Nadwah and adds six new gates on its site, plus twelve internal and three external doors elsewhere.

Late 10th century CE: The geographer al-Maqdisi records nineteen gates, naming Bab Bani Shaybah as the most important.

975 AH (1571 CE): Sultan Selim II commissions Mimar Sinan to rebuild the mosque’s roof with stone domes.

1039 AH (1629–1630 CE): Severe flooding damages the Kaaba; Sultan Murad IV undertakes a major renovation, bringing the minaret count to seven.

984 AH (Ottoman period): Sultan Murad Khan renovates the Abbasid-era southern gates without changing their footprint.

1375 AH (1955–1956 CE) onward: The first Saudi expansion begins under King Saud, following the initiative of King Abdulaziz, continuing through King Faisal’s reign into the early 1970s.

18 Rajab 1387 AH (22 October 1967 CE): The historic freestanding Bab Bani Shaybah arch is demolished to clear space in the Mataf.

2 Safar 1409 AH (13 September 1988 CE): King Fahd lays the foundation for the second Saudi expansion, adding a western wing, eighteen gates, and two minarets.

2008 CE: The King Abdullah Expansion is announced; the Shubaika and Shamiya neighbourhoods are cleared for the new northern extension.

19 August 2011 CE: King Abdullah bin Abdulaziz lays the foundation stone for the third Saudi expansion.

11 September 2015 CE: A construction crane collapses onto the mosque grounds, killing over a hundred people shortly before that year’s Hajj.

2017 CE: The King Abdullah Expansion opens formally in stages, introducing the current gate numbering system.

August 2019 CE: Courtyard additions are reported complete; minaret construction begins on the three principal historic-named gates.

2020 CE: Construction slows significantly amid the global COVID-19 pandemic.

2022–2023 CE: Work resumes at pace; a new Saudi-style portico is inaugurated by Sheikh Abdul Rahman al-Sudais.

2024 CE: The King Abdullah Expansion is reported substantially complete, with minaret work in its final stages.

2025–2026 CE: The Grand Mosque’s reported capacity approaches four million worshippers at peak; construction and refinement work continues in specific zones, underscoring the importance of verifying gate arrangements on arrival, as emphasised throughout this article.

Islamic Heritage and the Wider Landscape of Umrah Historical Sites

The gates of Masjid al-Haram do not exist in isolation from the wider network of Islamic heritage sites that make up a complete Umrah or Hajj journey. A pilgrim entering through the King Abdul Aziz Gate today stands a short walk from the Clock Tower complex and, beyond it, the general direction of Jabal al-Nour and the Cave of Hira, where the first revelation is traditionally understood to have come to the Prophet ﷺ; a pilgrim leaving through one of the gates near Mount Safa is stepping directly onto ground associated with Hajar’s search for water, commemorated in the Sa’i ritual itself. Understanding the gates as part of this larger network of Seerah locations — rather than as an isolated architectural curiosity — is part of what this guide has tried to convey throughout: the mosque’s perimeter is not simply a wall with doors in it, but the connective boundary between the House of Allah and the wider sacred geography of Makkah that surrounds it. Guides such as the official Saudi Ministry of Hajj and Umrah portal to Madinah historical places typically make the same point about the gates of Masjid an-Nabawi, and the comparison is instructive: in both cities, the mosque’s gates function as the seam between a single sacred building and an entire city’s worth of remembered history.

This connective function is one of the clearest ways the history of Masjid al-Haram differs from many other historical landmarks in Saudi Arabia. A fortress or a palace, however old, is usually a closed chapter of history, visited for what it was. Masjid al-Haram’s gates are still, today, functioning exactly as gates have always functioned here: controlling who moves between the ordinary city and the sanctuary at its centre. The specific stones have changed dozens of times over fourteen centuries. The function has not changed once.

Visiting Masjid al-Haram: A Closing Summary

Visiting Masjid al-Haram today means engaging with a building that is simultaneously one of the oldest continuously used sacred sites on earth and one of the newest large-scale construction projects in the Muslim world, actively being finished around you as you pray. The history of Masjid al-Haram’s gates — from Umar’s first stone wall in 17 AH, through the Abbasid inscriptions and Ottoman domes, to the King Abdullah Expansion’s minarets completed only in the last few years — is the history of successive generations deciding that the sanctuary’s boundary mattered enough to keep rebuilding, at whatever cost, as the number of people wanting to cross it kept growing. The history of Masjid al-Haram, told through its gates, is ultimately a history of hospitality at an almost unimaginable scale, sustained across fourteen centuries by rulers who mostly never lived to see the pilgrims their gates would eventually serve. When you walk through whichever gate brings you to the Kaaba, you are the reason all of that building happened, whether or not you ever think about it in those terms. Whether you have come to research the Islamic history of this site or simply to make Umrah, the gate you use is, in the end, a small and replaceable detail. What matters — as it has for fourteen centuries, before any of these gates existed in their current form — is what happens once you are through it.

Key Lessons

Historical

The gates of Masjid al-Haram tell the story of Islam’s own institutional history more completely than almost any other single feature of the building. Every major political transition in early and medieval Islamic history left a mark on this boundary wall: Umar’s caliphate gave it its first enclosure; Uthman’s gave it porticoes; the Umayyads gave it minarets and imported marble; the Abbasids gave it the named southern gates that would stand for eleven centuries; the Ottomans gave it domes and decorative refinement without changing its footprint; and the Saudi state, in living memory, demolished and rebuilt nearly all of it twice over, then began rebuilding it a third time on a scale no previous dynasty could have imagined. A visitor who understands the gates understands, in miniature, the entire political history of the lands of Islam from the seventh century to the present. No dynasty that held religious or political legitimacy in the Muslim world failed to leave some mark on this specific boundary, which is itself a measure of how central this place has remained across fourteen centuries of otherwise dramatic change.

Spiritual

The most important spiritual lesson embedded in the history of these gates is one this article has tried to state plainly rather than let the reader infer: sanctity attaches to sincere intention and to the place itself, not to the specific door a person happens to walk through. The Prophet ﷺ taught a single, universal dua for entering any mosque (Sahih Muslim 713), not a different dua for each of the mosque’s many gates, and the scholarly consensus discussed at length in this article’s Common Misconceptions section confirms that no gate carries independent, additional merit simply by virtue of its name or its association with a beloved historical figure. This is not a diminishment of devotion; if anything, it is a liberation from an anxiety many pilgrims carry unnecessarily — the fear of having “done it wrong” by entering through the “wrong” door. Allah’s mercy, per the Prophet’s ﷺ own words, is available at every one of the mosque’s more than two hundred gates, not rationed out more generously at some than others.

Personal

For the individual pilgrim, the deepest personal lesson of this article’s research is the sheer scale of human effort — spanning fourteen centuries, a dozen dynasties, and, in the most recent phase alone, tens of billions of dollars — that has gone into making sure a person like you has somewhere safe, wide, and well-marked to walk through on the way to the Kaaba. Nobody who built any of these gates, from Umar ibn al-Khattab to King Abdullah bin Abdulaziz, knew your name or would ever meet you. They built for a stranger they would never see, whose only connection to them was a shared act of worship at the same physical point on the earth’s surface. That is worth sitting with for a moment before you walk through whichever gate you use.

Practical

The single most transferable practical lesson of this entire guide is this: memorise your gate by number and by a specific nearby landmark before you separate from anyone in your group, photograph the gate’s illuminated sign the moment you enter, and treat every specific gate number in any guide — including this one — as a strong, well-researched starting point that must still be verified against the signage actually in front of you on the day you arrive. The building changes. The habit of checking does not need to.

Authentic Sources

Primary Islamic Sources

This article draws its hadith citations from Sahih al-Bukhari and Sahih Muslim as presented on Sunnah.com, specifically Sahih al-Bukhari 4290 and 1578 (the Prophet’s ﷺ entry to Makkah at the conquest), Sahih al-Bukhari 4287 (the destruction of the idols), Sahih al-Bukhari 440 and 505 (entry into the Kaaba’s interior), Sahih al-Bukhari 444 (the two-rak’ah mosque greeting), Sahih Muslim 1218 (Jabir’s account of the Farewell Pilgrimage), and Sahih Muslim 713 (the general mosque-entry dua). Qur’anic citations are drawn from Quran.com, specifically Surah al-Baqarah 2:127, 2:158, and 2:125; Surah al-Hijr 15:46; and Surah al-Isra 17:80. The account of the Prophet’s ﷺ return of the Kaaba’s key to Uthman ibn Talha and the Banu Shaybah clan derives from Ibn Hisham’s recension of Ibn Ishaq’s biography of the Prophet ﷺ (the Sira tradition). Readers should approach the biographical (siyar) tradition — including the works of Ibn Ishaq, and, more broadly, later historians such as al-Waqidi and al-Tabari — with an appropriate degree of caution distinct from the caution applied to the tightly source-critical hadith collections: these are invaluable and largely reliable historical sources for the broad narrative of early Islamic history, but their individual reports are not always subjected to the same chain-by-chain scrutiny as material collected in Sahih al-Bukhari or Sahih Muslim, and specialists grade individual reports within them accordingly, as this article has tried to do explicitly wherever such a report is cited.

Classical Scholars

This article references the tafsir traditions of Ibn Kathir and al-Tabari on the Qur’anic verses associated with the historic Bab Bani Shaybah arch and the Safa-Marwah ritual; the historical and geographical account of al-Maqdisi, the tenth-century Jerusalemite geographer who recorded nineteen gates at Masjid al-Haram and identified Bab Bani Shaybah as the most significant; the jurisprudential framework of Ibn Taymiyyah on distinguishing established sunnah from unsubstantiated local custom; the documentary and historical method of Nur al-Din al-Samhudi, author of Wafa’ al-Wafa; and the modern commentary of Sheikh Muhammad ibn Salih al-Uthaymin on the distinction between sunnah maqsudah and incidental historical circumstance, a distinction central to this article’s treatment of gate-specific merit throughout.

Modern Academic and Reference Sources

This article relies extensively on the architectural and historical documentation compiled by Madain Project, including its dedicated pages on Bab Bani Shaiba and its full inventory of the gates of Masjid al-Haram. Official information on the current numbered gate system, including the identification of the five principal gates, is drawn from the Saudi Ministry of Hajj and Umrah’s official Umrah Guide for Domestic Pilgrims and the Ministry of Hajj and Umrah’s website. Scholarly rulings on the misconceptions addressed in this article are drawn from Islam Question and Answer, fatwa 34869, and fatwa 109317, both presenting rulings of the Permanent Committee for Islamic Research and Issuing Fatwas in Saudi Arabia. Information on hotel proximity to specific gates draws on the official Saudi tourism authority resource Discover Makkah’s guide to Abraj Al Bait.

A Note on Method

This article has tried, throughout, to separate three distinct categories of claim: statements resting on chain-verified, authentic hadith with an exact reference; statements resting on the substantially reliable but less tightly source-critical biographical and historical tradition; and statements that are, however beloved and widely repeated, best understood as popular tradition without a documented textual basis. Wherever a claim about a specific gate’s connection to a specific event in the Prophet’s ﷺ life could not be traced to a source stronger than repeated guidebook assertion, this article has said so explicitly rather than silently upgrading tradition into established fact. The volatility of the physical mosque itself — genuinely, continuously under construction for close to two decades at the time of writing in 2026 — means that every specific number, distance and gate-name pairing in this article should be treated as a well-researched snapshot rather than a permanent record, and verified against current on-site signage and official Saudi government guidance before being relied upon for a real visit.

Frequently asked questions

About 262 after the King Abdullah expansion, including 13 gates designated for people with disabilities. The count changes as expansion work continues, and every gate carries a name and a number displayed above it.

Any gate leads into the mosque, but King Abdulaziz Gate (1) and King Fahd Gate (79) give the most direct access to the Mataf for tawaf. The Umrah Gate, on the north-western side, is the traditional entry point and, per tradition, the gate through which the Prophet entered for his final Umrah.

King Abdulaziz Gate, the grand main entrance on the southern side of the mosque, facing the Abraj al-Bait clock tower. It is one of the largest gates and a common meeting landmark for pilgrim groups.

Masjid al-Haram operates around the clock, and gates are generally open day and night. During peak crowds in Ramadan and Hajj, authorities may direct flows by temporarily designating gates as entry-only or exit-only.

Memorise or photograph the name and number of the gate you enter, agree on a meeting point such as a numbered gate or the clock tower, and use the minarets and electronic signs for orientation. Gate numbers run in sequence around the building.