Deen Hub

Sign In
history

The Hijra: The Prophet's Migration from Mecca to Medina

Deen Hub Editorial
2026-05-12
8 min read
The Hijra — the migration of the Prophet Muhammad (peace be upon him) and his Companions from Mecca to Medina in 622 CE — stands as one of the most consequential events in human history. So pivotal was this moment that the second Caliph, Umar ibn al-Khattab (may Allah be pleased with him), later designated it as the starting point of the Islamic lunar calendar. Every Muslim who writes a date in Hijri notation is marking time from this single act of faith: a small group of believers leaving behind their homes, their wealth, and their tribal identities to preserve their religion and establish a community where Islam could truly flourish.

To understand the Hijra, one must understand the conditions that made it necessary. For thirteen years, the early Muslims endured relentless persecution in Mecca. The Quraysh — the dominant tribe and custodians of the Kaaba — saw the Prophet's monotheistic message as a direct threat to their religious, economic, and social power. Converts were tortured, boycotted, and killed. The Prophet himself was mocked, pelted with garbage, and had the intestines of a slaughtered camel thrown on his back while he prayed. Several Companions fled to Abyssinia to escape the persecution. But Mecca remained the Prophet's home, and he stayed until Allah commanded otherwise.

The permission to migrate came in the thirteenth year of prophethood, after a group of men from Yathrib (later renamed Medina) pledged allegiance to the Prophet at Aqaba — promising to protect him as they would protect their own families. This pledge, known as the Second Pledge of Aqaba, was the opening of a new chapter. The Prophet quietly instructed his Companions to begin migrating to Medina in small groups. By the time the Quraysh realised what was happening, most of the Muslim community had already left.

The Prophet himself was the last to leave. The night before his departure, the Quraysh — having learned of his planned migration — surrounded his house intending to kill him before dawn. They chose one man from each tribe so that the blood-guilt would be shared among all and the Banu Hashim (the Prophet's clan) would be unable to take revenge on any single tribe. In a moment of divine protection that stunned the assassins, the Prophet walked out through their midst, scattering dust and reciting the opening verses of Surah Ya-Sin. Allah had literally caused them not to see him.

The journey itself lasted approximately two weeks and was fraught with danger. The Prophet and Abu Bakr (may Allah be pleased with him) hid in the Cave of Thawr south of Mecca for three days while Qurayshi search parties scoured the region. The famous moment where a spider spun its web and a dove nested at the cave's entrance — leading the pursuers to conclude no one could have entered — is recorded in traditional accounts as a sign of divine protection. When Abu Bakr expressed fear, the Prophet spoke the words Allah would later immortalise in the Quran: "Do not grieve; indeed Allah is with us." (9:40). After three days, a trusted guide led them northward on an unfamiliar coastal route to avoid detection.

The arrival in Medina transformed Islam from a persecuted religious movement into a state. The Prophet's first acts in Medina were deeply practical and visionary: he built the first mosque (Masjid al-Nabawi) as the spiritual and political centre of the new community; he established the Brotherhood (Mu'akhat) pairing each Meccan emigrant (Muhajir) with an Ansari helper (Helper of Medina) in a bond of shared property and mutual support; and he drafted the Constitution of Medina — a remarkable document establishing a pluralistic political community that guaranteed rights and responsibilities for Muslims, Jews, and pagan tribes alike. It is considered by historians of Islamic law to be the first written constitution in world history.

The Hijra's spiritual significance runs as deep as its political one. It demonstrated a foundational Islamic principle: that when a believer cannot practise their religion freely, migration to a place where they can is not defeat but duty. The Quran described those who refused to migrate despite having the means as wronging themselves (4:97). The early migrants (Muhajirun) are honoured throughout the Quran and hadith as the vanguard of the faith — people who gave up everything for Allah. Allah praised them: "Indeed, those who have believed and emigrated and fought with their wealth and lives in the cause of Allah — they are greater in rank with Allah." (9:20).

The political document the Prophet produced in Medina — known today as the Constitution of Medina (Sahifat al-Madinah) — is one of the most significant texts of early Islamic governance. It established that the Muslims, Jews, and pagan tribes of Medina formed one community (ummah) bound by mutual defence and clear obligations. Each group retained its own customs and legal traditions while committing to collective security. Non-Muslims were guaranteed religious freedom, legal protection, and the right to their own courts. Historians of political theory describe it as a proto-constitutional document of remarkable sophistication for its era. This pluralistic framework, built in the immediate aftermath of the Hijra, demonstrates that the Islamic state was never conceived as a theocratic monolith but as a governed, pluralistic community grounded in shared responsibility.

The Hijra also established a paradigm for how communities of faith can be rebuilt in adversity. The city of Medina — once a place of inter-tribal warfare and bloodshed — was transformed within a few years into a model of justice, brotherhood, and governance. The lessons of the Hijra are not merely historical. Every Muslim who leaves a harmful environment for a better one, every person who sacrifices material comfort for principle, every community that chooses to build rather than remain in a situation of oppression — is enacting the spirit of the Hijra. The migration was not an ending but the beginning of everything that followed. The Prophet lived in Medina for the remaining ten years of his life, and every major institution of Islam — the mosque, the Friday sermon, the call to prayer, the law of the land — was established in those ten Medinan years, rooted in the act of trust that the Hijra represented.



Recommended Reading


If you found this article helpful, you might also be interested in:

  • Complete Guide to Salah (Prayer)

  • Introduction to the Quran

  • Advertisement