The Hijrah was Prophet Muhammad’s migration from Mecca to Medina in 622 CE, undertaken to escape persecution and establish the first Muslim community. It is considered so pivotal that the Islamic (Hijri) calendar counts its years from this event.

Why Did the Prophet Leave Mecca?

For thirteen years after the first revelation, the Prophet preached in Mecca while opposition from the Quraysh — the city’s ruling tribe — grew from mockery to boycott to open violence. Early Muslims were tortured; some had already fled to Abyssinia for safety. When leaders in the northern city of Yathrib (later renamed Medina) invited the Prophet to come as an arbiter and leader, and pledged to protect him, the way out opened.

Muslims began quietly migrating north in small groups. When the Quraysh learned the movement was slipping beyond their control, they plotted to kill the Prophet . On the night of the planned assassination, his cousin Ali lay in his bed as a decoy while the Prophet slipped out of the city with his closest friend, Abu Bakr.

The Cave of Thawr: Three Nights of Hiding

Instead of heading north toward Medina, the two traveled south — a deliberate misdirection — and hid in the Cave of Thawr on the outskirts of Mecca for three nights while search parties combed the desert. In the most famous moment of the journey, trackers stood at the very mouth of the cave. Abu Bakr whispered his fear; the Prophet replied with words preserved in the Quran (9:40):

“Do not grieve; indeed Allah is with us.”

The pursuers turned away. When the search cooled, a hired guide brought camels, and the small party set out on a rarely used coastal route.

The Road to Medina

The journey covered roughly 280 miles (450 km) of desert — about two weeks of travel including the days in hiding — with a bounty on the Prophet’s head. One famous episode involved the horseman Suraqa ibn Malik, who caught up to the travelers hoping to claim the reward, but turned back after his horse repeatedly stumbled, and left having asked for a pledge of safety instead.

On arrival at Quba, on the outskirts of Medina, the Prophet paused to build the first mosque in Islam. He then entered Medina itself to a famously joyful welcome.

Why the Islamic Calendar Begins with the Hijrah

When the Muslim community later needed a calendar, they did not begin it with the Prophet’s birth or with the first revelation — they chose the Hijrah. The migration marked the moment the Muslim community gained a home: a place to worship openly, build institutions, and form a society. Years in the Islamic calendar are labeled AHAnno Hegirae, “in the year of the Hijrah.”

Key Facts: The Hijrah

  • Date: 622 CE (year 1 AH in the Islamic calendar)
  • Route: Mecca → Cave of Thawr → coastal route → Quba → Medina
  • Distance: roughly 280 miles / 450 km
  • Duration: about two weeks, including three nights in the Cave of Thawr
  • Companion: Abu Bakr al-Siddiq
  • Legacy: the founding of the first Muslim community and the start of the Islamic calendar

What the Hijrah Means Today

For Muslims, the Hijrah is more than history — it is a template for faithful transition: prepare carefully, act courageously, trust completely, and build generously when you arrive. That template is exactly what Mecca to Medina explores across 100 personal reflections, each connecting one moment of this journey to modern life.

Further reading: the entry on the Hijrah at Encyclopaedia Britannica, and classical biographies of the Prophet such as Ibn Hisham's recension of Ibn Ishaq's Sirah.

Walk the Journey in 100 Reflections

Mecca to Medina turns this history into lessons for your own life.

Buy the Book — $23.39