MedinaCity.net

Home / The Hijrah

History

The Hijrah: the migration that made Medina

In 622 CE the Prophet Muhammad left Mecca for the oasis of Yathrib — a journey so consequential that the Islamic calendar counts its years from it.

Why Mecca had become untenable

By 622 CE the Prophet Muhammad had preached in Mecca for some thirteen years. The Quraysh leadership saw the new faith as a threat to their authority and to the pagan sanctuary economy; persecution of Muslims escalated from ridicule to boycott, torture of the vulnerable, and finally a plot to kill the Prophet himself. An earlier group of Muslims had already emigrated to Abyssinia for safety. What changed the calculus was Yathrib: at the pledges of Aqaba in 621 and 622 CE, delegations from the feuding Aws and Khazraj tribes invited the Prophet to their oasis as leader and arbiter, and undertook to protect him as they would their own families.

The escape and the cave of Thawr

Through the summer of 622 the Muslims of Mecca slipped away north in small groups. Tradition records that the Quraysh clans finally agreed to murder the Prophet jointly, so that no single clan could be blamed. On the night chosen for the attack, his cousin Ali ibn Abi Talib slept in his bed as a decoy while the Prophet left the city with his closest companion, Abu Bakr.

Rather than riding straight north toward Yathrib, the two men went south, hiding for three days in a cave on Mount Thawr outside Mecca while search parties scoured the roads — the episode alluded to in the Qur'an (9:40), where the Prophet reassures his companion that "God is with us". When the hunt cooled, a hired guide, Abdullah ibn Urayqit, led them by unfrequented tracks near the Red Sea coast before turning inland — a journey of roughly ten days across more than 400 km of desert.

Arrival at Quba and the first mosque

The Prophet reached Quba, on the southern edge of the Yathrib oasis, in Rabi' al-Awwal of that year — September 622 CE. He stayed there several days as a guest of the Banu Amr ibn Awf and laid the foundations of Quba Mosque, honoured in tradition as the first mosque of Islam. Setting out again for the centre of the oasis, he stopped in the valley of Ranuna to lead the first congregational Friday prayer.

Inside the town, every clan begged him to lodge with them. According to the famous account, the Prophet let his she-camel, al-Qaswa, walk on until she knelt of her own accord on a plot used for drying dates. He bought the land and built on it his house and mosque — the origin of today's Prophet's Mosque.

Timeline of the Hijrah

StageWhat happened
621–622 CEPledges of Aqaba: Yathrib's tribes invite the Prophet and pledge protection
Summer 622Muslims emigrate from Mecca in small groups; Quraysh plot the assassination
Departure nightAli sleeps in the Prophet's bed; the Prophet and Abu Bakr leave Mecca
Three daysConcealment in the cave on Mount Thawr, south of Mecca
~10 days' travelCoastal detour north with the guide Abdullah ibn Urayqit
September 622Arrival at Quba; foundation of the first mosque; first Friday prayer at Ranuna
622 onwardBuilding of the mosque in Medina; the pact known as the Constitution of Medina

Why the calendar begins here

The Hijrah marks the moment Islam passed from a persecuted preaching movement to an organised community with territory, law and mutual defence. That is why, under the caliph Umar ibn al-Khattab around 638 CE, when the young state needed a fixed dating system, the consultation settled on the year of the Hijrah — not the Prophet's birth or first revelation — as year 1 AH (anno Hegirae). Because the Islamic calendar is lunar, its year is about eleven days shorter than the solar year, which is why AH and CE dates drift against each other.

Key takeaway: the Hijrah was less a flight than a founding. Everything that followed — the constitution, the battles of Uhud and the Trench, Medina's role as first capital of Islam — flows from the decision of 622 CE.

Visitors can retrace the arrival today: pray at Quba, walk the pedestrian route north toward the centre, and stand in the mosque that grew from al-Qaswa's resting place — a natural half-day covered in our itineraries.