The hajj is a pilgrimage to Mecca performed by millions of Muslims every year, coming from all over the Muslim world. Its history goes back many centuries. The present pattern of the Islamic Hajj was established by Islamic prophet Muhammad, around 632 CE, who reformed the existing pilgrimage tradition of the pagan Arabs. According to Islamic tradition, the hajj dates from thousands of years earlier, from when Abraham, upon God's command, built the Kaaba (the "house of God"). This cubic building is considered the most holy site in Islam and the rituals of the hajj include walking repeatedly around it (circumambulation).

In medieval times, pilgrims would gather in cities like Basra, Damascus, and Cairo to go to Mecca in groups and caravans comprising tens of thousands of pilgrims. Some came from further afield in sailing ships. The Sultans of the Ottoman Empire supported the pilgrims, appointing the Amir al-Hajj ("Commander of the Hajj") to organise and lead the caravans. As other modes of transport including steamships and trains were introduced, pilgrims were able to make the trip to Mecca more quickly.

The nomadic tribes of the desert – known as Bedouin – had been a persistent security issue for the hajj caravans. The annual pilgrimage offered pilgrims as well as professional merchants the opportunity to conduct various merchandising activities both on route and in Mecca, Damascus, and Cairo. Through its history, the hajj has influenced literature and art as pilgrims have written guides and created artistic depictions of the holy sites and rituals.

Origin In Islamic tradition, pilgrimage was introduced during the time of prophet Ibrahim (Abraham). According to tradition, by God's command, Abraham left his wife Hagar (Hajar) and his son Ishmael (Ismail) alone in the desert of ancient Mecca with little food and water that they soon used up. Mecca was then an uninhabited place. In search of water, Hagar desperately ran seven times between the two hills of Safa and Marwah but found none. Back in despair to Ishmael, she saw the baby scratching the ground with his leg and a water fountain underneath.Peters (1994), pp. 4–7Haykal (2008), pp. 29–30 Because of the presence of water, tribes started to settle in Mecca, Jurhum being the first such tribe to arrive. When grown up, Ishmael married in the tribe and started living with them. The Quran states that Ibrahim, along with his son Ishmael, raised the foundations of a house that is identified by most commentators as the Kaaba. After the placing of the Black Stone in the Eastern corner of the Kaaba, Ibrahim received a revelation in which Allah told the aged prophet that he should now go and proclaim the pilgrimage to mankind. The Quran refers to these incidents in and . Islamic scholar Shibli Nomani mentions that the house raised by Abraham was 27 feet high, 96 feet long, and 66 feet wide.Shibli Nomani. Sirat-un-Nabi. vol 1, Lahore

History

Pre-Islamic Arabia

The pilgrimage to Mecca is attested in some pre-Islamic Arabic poetry. Compared to Islamic-era poetry where the Hajj appears ubiquitously, only a small number of references are found to it in pre-Islamic poetry, indicating that its Arabian centrality was a development of Islamic times. Among the references that do exist, they are concentrated among poets who resided near Mecca with a notable absence among those in northern, eastern, and southern Arabia. Pre-Islamic poetry consistently associates the Hajj with a single deity (Allah), correlating with the rise of pre-Islamic Arabian monotheism indicated by inscriptions, although the survival of vestigial pagan rites is indicated by the mention of sacrifice stones in these contexts. The rites of the pre-Islamic Hajj in the sixth century were similar to those in the Muslim era, and evidence from the poetry of Zuhayr bin Abi Sulma found in the Mu'allaqat shows that, by the sixth century, the Quraysh (and perhaps earlier, Jurhum) were the custodians of the Kaaba. Some of the main changes between the pre-Islamic and Islamic Hajj instituted by Muhammad appear to have been his decoupling of the Hajj from animal hunting and animal sacrifice rites.

Pre-Islamic Arabia was a region of many pilgrimage rituals beyond that of Hajj. Many words were used to describe pilgrimage, including the Semitic ḥgg. The most important pilgrimage ritual in South Arabia was the one to the Temple of Awwam, dedicated to the god Almaqah, which was associated with a ḥaram or maḥram. A number of other South Arabian deities were also associated with special sanctuaries and pilgrimages, including Dhu Samawi, Qaynan, Siyan, and several more.

Muhammad and the Hajj The present pattern of the Hajj was established by Islamic prophet Muhammad who made reforms to the pre-Islamic pilgrimage of the pagan Arabs. Mecca was conquered by the Muslims in 630 CE. Muhammad then destroyed all the pagan idols within the Kaaba, and consecrated the building to Allah.Haykal (2008), pp. 439–40 Next year, at the direction of Muhammad, Abu Bakr led 300 Muslims to the pilgrimage in Mecca where Ali delivered a sermon stipulating the new rites of Hajj and abrogating the pagan rites. He especially declared that no unbeliever, pagan, and naked man would be allowed to circumambulate the Kaaba from the next year.Haykal (2008), p. 501 In 632 CE, shortly before his death, Muhammad performed his only and last pilgrimage with a large number of followers, and taught them the rites of the Hajj and the manners of performing them.Campo (2009), p. 494 In the plain of Arafat, he delivered a famous speech – known as The Farewell Sermon – to those who were present there.Haykal (2008), p. 520–1 From then, Hajj became one of the Five Pillars of Islam. Hajj was made compulsory in 9th Hijri.

Caliphate era

During medieval times, pilgrims would gather in the capital cities of Syria, Egypt, and Iraq to go to Mecca in groups and caravans comprising tens of thousands of pilgrims.Peters (1994), p. 164 The Muslim rulers would undertake the responsibility of the Hajj, and provide state patronage for organizing such pilgrimage caravans.Campo (2009), p. 283Singer (2002), p. 142 To facilitate the pilgrimage journey, a road measuring 900 miles was constructed, stretching from Iraq to Mecca and Medina. The road's construction was probably undertaken during the third Abbasid caliph al-Mahdi, father of fifth Abbasid caliph Harun al-Rashid, around 780 CE. It was later named the 'Way of Zubayda' (Darb Zubaidah), after Harun's wife, as she is noted for conducting improvements along the route and furnishing it with water cisterns and eating houses for pilgrims at regular intervals.Robinson (1996), p. 139Al-Suyuti Both Harun and Zubayda performed the Hajj several times. They also conducted improvement activities in Mecca and Medina,Al-Hariri-Rifai (1990), p. 25Peters (1994), p. 71 which included the construction of an extensive aqueduct system.

A good deal of information on the medieval hajj comes from the firsthand observations of three Muslim travelers - Nasir Khusraw, Ibn Jubayr, and Ibn Battuta - who themselves performed the pilgrimage and recorded detailed accounts. Khusraw performed the hajj in 1050. Starting his first journey from Granada in 1183, Ibn Jubayr, a native of Spain, performed his pilgrimage in 1184 and then went to Baghdad.Friedman (2013), p. 270 Ibn Battuta, a native of Morocco, left his home in 1325 and performed his pilgrimage in 1326.Friedman (2013), p. 269 After the fall of Baghdad in 1258 (during Mamluk period), Damascus and Cairo became the main assembly points for the pilgrims.Cosman (2008), p. 814. While pilgrims from Syria, Iraq, and Iran, and Anatolia regions joined the Damascus caravan, those from North Africa and Sub-Saharan regions joined the Cairo caravan.

Ottoman era

After the Ottomans came into power, the sultans of Ottoman Empire concerned themselves with the management of hajj program, and allocated annual budget for its arrangement.Peters (1994), pp. 145-6 During this period, Damascus and Cairo were still the main points from where the chief hajj caravans would depart and come back.Peters (1994), p. 146Singer (2002), p. 140 These caravans included thousands of camels for carrying pilgrims, merchants, goods, foodstuff, and water. A lot of people also made their pilgrimage journey on foot. The rulers would supply necessary military forces to ensure security of hajj caravans. Commanders for the caravans leaving from Cairo and Damascus were designated by the Muslim sovereign and were known as Amir al-Hajj. They were in charge of protecting the pilgrims of the caravan, and securing funds and supplies for the journey.Singer (2002), p. 141 Surgeons and physicians were also sent with Syrian caravans to doctor the pilgrims free of costs.Peters (1994), p. 269. During this period, around 20,000 to 60,000 people made their pilgrimage annually.

Modern period

During the second half of the nineteenth century (after 1850s), steamships began to be used in the pilgrimage journey to Mecca, and the number of pilgrims traveling on sea route increased.Tagliacozzo (2016), p. 178 With the opening of Suez Canal in 1869, the travel time for pilgrimage was shortened.Davidson (2002), p. 220 Initially, the British ship companies had a monopoly in these steamship business and they offered little facilities to the pilgrims. In 1886, the then government of India adopted some regulations to improve the pilgrimage journey from India to Hejaz.Peters (1994), p. 283 During the early twentieth century, the Ottoman Sultan Abdul Hamid II constructed the Hejaz Railway between Damascus and Medina which further facilitated the pilgrimage journey: the pilgrims traveled in relative ease and reached Hejaz in only four days.Al-Hariri Rifai (1990), p. 38 Starting from Damascus in September 1900, the railway reached Medina in September 1908 having a span of 1,300 kilometers (810 mi).Peters (1994), p. 316–7Cole, Beverly (2011). Trains. Potsdam, Germany: H. F. Ullmann. p. 127. . The railroad was damaged during the First World War by an Arab Revolt force led by British officer T. E. Lawrence.Davidson (2002), pp. 220–1 Plague used to break out almost every year until 1918.

After a contract between the Saudi Arabian government and the Misr Airlines of Egypt in 1936, the Misr Airlines introduced the first airline service for Hajj pilgrims in 1937. The subsequent engine trouble of the aircraft disrupted the hajj flights, and the Second World War from 1939 to 1945 caused a decrease in pilgrims' number. Modern transportation systems in the pilgrimage journey effectively began only after the Second World War. Saudi Arabia established the Arabian Transport Company and the Bakhashab Transport Company, in 1946 and 1948, respectively, in order to transport the pilgrims at various Hajj sites which proved highly effective in later years, and the use of camels as a means of transport for pilgrimage journeys virtually ended in 1950. According to one account, during the pilgrimage seasons of 1946–1950, around 80% of the total foreign pilgrims arrived by sea, 10% by land, and 7% by air transport.Tagliacozzo (2016), p. 132–133 The 1970s and subsequent decades saw a dramatic increase in the number of pilgrims because of the availability of affordable air travel system.Tagliacozzo (2016), p. 132