Step-by-step explanation:
In June 1325, at the age of twenty-one, Ibn Battuta set off from his hometown on a hajj, or pilgrimage, to Mecca, a journey that would ordinarily take sixteen months. He would not see Morocco again for twenty-four years.
"I set out alone, having neither fellow-traveller in whose companionship I might find cheer, nor caravan whose part I might join, but swayed by an overmastering impulse within me and a desire long-cherished in my bosom to visit these illustrious sanctuaries. So I braced my resolution to quit my dear ones, female and male, and forsook my home as birds forsake their nests. My parents being yet in the bonds of life, it weighed sorely upon me to part from them, and both they and I were afflicted with sorrow at this separation."
He travelled to Mecca overland, following the North African coast across the sultanates of Abd al-Wadid and Hafsid. The route took him through Tlemcen, Béjaïa, and then Tunis, where he stayed for two months.For safety, Ibn Battuta usually joined a caravan to reduce the risk of being robbed. He took a bride in the town of Sfax, the first in a series of marriages that would feature in his travels.
Ottoman 17th century tile depicting the Kaaba, in Mecca
In the early spring of 1326, after a journey of over 3,500 km (2,200 mi), Ibn Battuta arrived at the port of Alexandria, at the time part of the Bahri Mamluk empire. He met two ascetic pious men in Alexandria. One was Sheikh Burhanuddin who is supposed to have foretold the destiny of Ibn Battuta as a world traveller saying "It seems to me that you are fond of foreign travel. You will visit my brother Fariduddin in India, Rukonuddin in Sind and Burhanuddin in China. Convey my greetings to them". Another pious man Sheikh Murshidi interpreted the meaning of a dream of Ibn Battuta that he was meant to be a world traveller.
He spent several weeks visiting sites in the area, and then headed inland to Cairo, the capital of the Mamluk Sultanate and an important city. After spending about a month in Cairo,[20] he embarked on the first of many detours within the relative safety of Mamluk territory. Of the three usual routes to Mecca, Ibn Battuta chose the least-travelled, which involved a journey up the Nile valley, then east to the Red Sea port of Aydhab.Upon approaching the town, however, a local rebellion forced him to turn back.
Ibn Battuta returned to Cairo and took a second side trip, this time to Mamluk-controlled Damascus. During his first trip he had encountered a holy man who prophesied that he would only reach Mecca by travelling through Syria.The diversion held an added advantage; because of the holy places that lay along the way, including Hebron, Jerusalem, and Bethlehem, the Mamluk authorities spared no efforts in keeping the route safe for pilgrims. Without this help many travellers would be robbed and murdered.
After spending the Muslim month of Ramadan in Damascus, he joined a caravan travelling the 1,300 km (810 mi) south to Medina, site of the Mosque of the Islamic prophet Muhammad. After four days in the town, he journeyed on to Mecca, where upon completing his pilgrimage he took the honorific status of El-Hajji. Rather than returning home, Ibn Battuta decided to continue traveling, choosing as his next destination the Ilkhanate, a Mongol Khanate, to the northeast.