The Hijrah: Migration to Madinah
The Hijrah — the migration of the Prophet Muhammad ﷺ and his companions from Makkah to Madinah in 622 CE — is the single most consequential event in early Islamic history. It marks the boundary between two fundamentally different phases of the prophetic mission: the years of patient endurance in Makkah, and the years of community building, governance, and expansion in Madinah. So foundational was this event that Umar ibn al-Khattab, as caliph, designated the year of the Hijrah as the first year of the Islamic calendar — a decision affirmed by the companions' consensus and maintained by the Muslim world to this day.
The Reasons for the Migration
By the thirteenth year of revelation, the situation of Muslims in Makkah had become untenable. The Quraysh had tried ridicule, social pressure, economic boycott, physical torture, and assassination attempts. The three-year boycott of the Hashimi clan had weakened the community and contributed to the deaths of Khadijah and Abu Talib — the Prophet's ﷺ two greatest protectors. Without Abu Talib's tribal protection, the Prophet ﷺ was personally vulnerable in ways he had not been before.
At the same time, the situation in Yathrib (later renamed Madinah) had become favorable. Pilgrims from the Khazraj tribe had heard the Prophet ﷺ at the annual Hajj fair, accepted Islam, and returned home to spread it. Over two successive years — in the First and Second Pledges of Aqabah — delegations from Madinah pledged their allegiance to the Prophet ﷺ, promising to receive him and protect him as they would protect their own families. The First Pledge had twelve men; the Second Pledge had seventy-three men and two women.
The Night of Departure
The Quraysh learned that the Prophet ﷺ was planning to leave and organized a plot: representatives of each major clan would simultaneously strike the Prophet ﷺ in his bed, so that the blood guilt would be distributed across all clans. The plan was revealed to the Prophet ﷺ through divine guidance. He instructed Ali ibn Abi Talib to sleep in his bed, wrapped in the Prophet's ﷺ green cloak. Ali agreed without hesitation.
The Prophet ﷺ walked out of his house past the conspirators who surrounded it — they did not see him. Islamic tradition holds that Allah caused him to pass through them unperceived, and that he recited the beginning of Surah Ya-Sin as he walked: "And We have put before them a barrier and behind them a barrier and covered them, so they do not see." (36:9) He went to Abu Bakr's house and they departed together into the night.
The Cave of Thawr
Rather than taking the direct northern road to Madinah, the Prophet ﷺ and Abu Bakr went south, to the Cave of Thawr in the hills above Makkah. They concealed themselves there for three days while the Quraysh organized an extensive manhunt, offering a reward of 100 camels to anyone who brought either of them back, dead or alive.
Searchers came to within yards of the cave. Abu Bakr, looking out and seeing their feet, whispered his fear to the Prophet ﷺ — and the Prophet's ﷺ response became one of the most quoted in Islamic literature: "Do not grieve; indeed Allah is with us." (9:40) A spider had reportedly spun a web across the cave's entrance and a pigeon had nested there, giving the impression that no one had entered recently.
The Journey and Arrival
After three days, Abu Bakr's freed slave Amir ibn Fuhayra brought fresh camels. A guide named Abdullah ibn Urayqit led them on a route along the Red Sea coast that avoided the expected roads. The journey took approximately eight days.
News of the Prophet's ﷺ approach preceded him. The Muslims of Madinah went out daily to the Harrah (the volcanic plain north of the city) to wait for him. The Prophet ﷺ first stopped at Quba, where he stayed for several days and laid the foundation of the first mosque built in Islam — Masjid Quba — which the Quran describes as a mosque "founded on taqwa from the first day." (9:108) He then entered Madinah itself. Every household invited him to stay with them. The Prophet ﷺ let his she-camel Qaswa walk freely, saying she was under divine instruction — she walked until she stopped and knelt at a spot near the home of Abu Ayyub al-Ansari, where the Prophet ﷺ would stay until his mosque was built. Madinah — the City of the Prophet — had its name and its meaning.
References in This Article
Related Articles
The Compilation of the Quran
How the Quran was preserved: from oral memorization during the Prophet's life to the standardized mushaf under Caliph Uthman.
The Rashidun Caliphate
The era of the four rightly-guided caliphs: Abu Bakr, Umar, Uthman, and Ali. The golden age of Islamic governance.
The Battle of Badr
The first major battle in Islamic history: 313 Muslims against 1,000 Quraysh, and how divine aid secured victory.
The Battle of Uhud
The second major battle: the reversal of fortune, the wounding of the Prophet, and the lessons for the ummah.