حج was first established by Prophet Ibrahim (Abraham) when Allah commanded him to build the کعبۃ اللہ in مکہ مکرمہ and call humanity to حج. The rites were later restored by Prophet Muhammad (صلی اللہ علیہ وسلم) during his farewell حج in 632 CE, forming the basis of the حج Muslims perform today.
The history of حج begins with Prophet Ibrahim (Abraham), صلی اللہ علیہ وسلم, who is regarded as the father of monotheism in Islam, Christianity, and Judaism. According to Islamic tradition, Allah commanded Ibrahim to leave his wife Hajar (Hagar) and infant son Ismail (Ishmael) in the barren valley of مکہ مکرمہ. It was here that the miraculous spring of زمزم burst forth to save them from thirst. Years later, Allah instructed Ibrahim and Ismail to build the کعبۃ اللہ as the first house of worship dedicated solely to the One God. The قرآن records this in Surah Al-Baqarah (2:127): 'And when Ibrahim and Ismail were raising the foundations of the House, [saying], Our Lord, accept [this] from us. Indeed, You are the Hearing, the Knowing.' After completing the construction, Allah commanded Ibrahim to proclaim the حج to all of humanity: 'And proclaim to the people the حج; they will come to you on foot and on every lean camel; they will come from every distant pass' (قرآن 22:27). This divine proclamation established حج as a universal act of worship that has continued for thousands of years.
In the centuries following Ibrahim's era, the pure monotheistic practices of حج became corrupted as the people of the Arabian Peninsula gradually fell into idolatry. By the time of Prophet Muhammad (صلی اللہ علیہ وسلم), the کعبۃ اللہ housed 360 idols, and the rituals of حج had been mixed with pagan customs, including naked circumambulation and the clapping of hands instead of نماز. The Quraysh tribe, as custodians of the کعبۃ اللہ, controlled the حج and profited enormously from the annual influx of حجاج from across Arabia. When Prophet Muhammad conquered مکہ مکرمہ in 630 CE (8 AH), he cleansed the کعبۃ اللہ of all idols and restored the monotheistic worship of Allah. The following year, he sent Abu Bakr to lead the حج and announced that no polytheist would be allowed to perform حج thereafter. In 632 CE (10 AH), Prophet Muhammad performed his only حج, known as Hajjat al-Wada (the Farewell Pilgrimage), which established the definitive rituals that Muslims follow to this day. During this حج, he delivered his famous Farewell Sermon at عرفات, addressing over 100,000 companions on matters of equality, justice, and the completion of the religion of Islam.
After نبی کریم's passing, the Rightly Guided Caliphs maintained the حج and ensured safe passage for حجاج. Under Umar ibn al-Khattab, the Mataf (circumambulation area) around the کعبۃ اللہ was expanded for the first time by purchasing and demolishing surrounding houses. The Umayyad and Abbasid caliphates further developed the infrastructure of مکہ مکرمہ and مدینہ منورہ, building roads, wells, and rest stations along major حج routes from Iraq, Syria, Egypt, and Yemen. The Ottoman Empire, which controlled the Hijaz from 1517 to 1916, invested heavily in the حج infrastructure. Sultan Suleiman the Magnificent rebuilt the کعبۃ اللہ's walls and renovated the مسجد الحرام. The Ottomans established the famous Surre Alayi, an elaborate annual caravan from Istanbul carrying gifts, provisions, and the Kiswa (the cloth covering of the کعبۃ اللہ) to مکہ مکرمہ. They also built the Hejaz Railway in 1908, connecting Damascus to مدینہ منورہ, which dramatically reduced the journey time for حجاج from the Levant and Turkey. Throughout these centuries, حج remained a perilous journey; many حجاج died from disease, bandits, extreme heat, and dehydration along the way. The حج could take months or even years of travel.
The modern transformation of حج began when the Kingdom of Saudi Arabia was founded in 1932. King Abdulaziz ibn Saud initiated the first major expansion of the مسجد الحرام in 1955, increasing its capacity from 50,000 to 400,000 worshippers. King Fahd's expansion in the 1980s and 1990s added air-conditioned نماز halls, escalators, and the now-iconic minarets, bringing capacity to over 800,000. The most ambitious project began under King Abdullah in 2011 and continues today: the Third Saudi Expansion aims to accommodate over 2.2 million worshippers simultaneously in the مسجد الحرام. This includes the massive Mataf expansion, new multi-story structures, advanced crowd-management systems, and the جمرات Bridge complex in منیٰ, which replaced the old ground-level stoning area and dramatically reduced the deadly stampedes that had plagued earlier years. The Haramain High-Speed Railway, opened in 2018, now connects مکہ مکرمہ, مدینہ منورہ, and Jeddah, allowing حجاج to travel between the holy cities in approximately two hours. Modern حج management also involves sophisticated logistics: tent cities in منیٰ with fire-resistant structures, mist-cooling systems throughout the holy sites, thousands of medical stations, and an extensive security apparatus. The annual حاجی count has grown from around 50,000 in the 1930s to over 2.5 million in recent years.
The 21st century has brought both unprecedented challenges and innovations to the حج. The COVID-19 pandemic in 2020 led to the most restricted حج in modern history, with only 1,000 حجاج permitted — a stark contrast to the 2.5 million who attended the previous year. The pandemic accelerated the adoption of digital technologies: electronic permits, health screening apps, crowd-monitoring AI, and robotic sanitation systems became standard features of حج management. Saudi Arabia's Vision 2030 plan includes ambitious goals for the حج: increasing annual عمرہ visitors to 30 million, developing the مدینہ منورہ Knowledge Economic City, and enhancing حاجی experiences through smart city technologies. The Neom and Red Sea development projects also aim to create new tourism corridors that could benefit حجاج. Climate change poses a growing concern, as rising temperatures in the Arabian Peninsula threaten حاجی safety during the summer months when حج falls on those years. Saudi authorities have responded with expanded cooling infrastructure, mandatory heat advisories, and research into climate-resilient حج management. The spiritual essence of حج, however, remains unchanged from Ibrahim's time: millions of Muslims from every corner of the world, regardless of race, wealth, or status, gather in simple white garments to answer the eternal call of 'Labbayk Allahumma Labbayk' — Here I am, O Allah, here I am.