There is large consensus in Islamic historiography that the Greater Pilgrimage to Mecca, the Ḥajj, was institutionalized in the ninth year of the Islamic calendar. It takes place every year in the first half of the Muslim month of dhil Ḥijja, culminating in the station at Mount Arafat on the tenth day of that month. Since then, Muslims from all over the world have travelled to the Holy Lands to fulfil this religious obligation, which is incumbent on all Muslims who can afford it. The Ḥajj is the opportunity for the atonement of all past sins. It is unique among the great religious pilgrimages for its doctrinal centrality, geographic focus, historical continuity and size, and global coverage. Alongside, and often associated with the Ḥajj, is the tradition of ziyāra or pious visitation in special mosques or mausoleums of Muslim holy people. The most important mausoleum for Muslims is that of the Prophet Muḥammad located in Medina, about four hundred kilometres from Mecca. Although not part of the ritual of the Ḥajj, the trip to Medina is made by pilgrims performing the Greater Pilgrimage or the Lesser Pilgrimage to Mecca (‘umra). In Medina, pilgrims visit the mausoleums of the Prophet, his companions, members of his family, and Muslim martyrs and some historical sites of great significance for the early Muslim community such as Mount Uhud and the Mosque of Two Qiblas.
Visitations (ziyāra) also take place to the mausoleums of Shiite imāms or Sufi shaykhs in Fez, Cairo, Ajmer Sharif, and Touba. For a long time, the Ḥajj was linked to the tradition of study (riḥla), as most pilgrims were scholars who spent time in centres of learning along the way to and in the Holy Lands to study, acquire books, and seek scholarly credentials.
Like elsewhere in the Muslim world, religious travel in West Africa was motivated by those very three reasons. The first was to perform the Greater (or Lesser) Pilgrimage to the Holy Lands and the second was to visit the shrines of holy Islamic figures. Last but not least, the third type of travel, which could be combined with either of the first two, was the search for esoteric and exoteric knowledge, which is typically sanctioned by the award of an authorization to transmit that knowledge (ijāza).