Donate
A mosque prayer niche lit by candlelight
Sira Nabawiyya

Chapter 14 of 22 · 622 CE

The Hijrah to Madinah

الهجرة إلى المدينة

With assassins waiting outside his door, the Prophet ﷺ slipped into the night on a journey that would mark the beginning of the Islamic calendar itself.


Read

إِلَّا تَنصُرُوهُ فَقَدْ نَصَرَهُ اللَّهُ إِذْ أَخْرَجَهُ الَّذِينَ كَفَرُوا ثَانِيَ اثْنَيْنِ إِذْ هُمَا فِي الْغَارِ إِذْ يَقُولُ لِصَاحِبِهِ لَا تَحْزَنْ إِنَّ اللَّهَ مَعَنَا

If you do not aid the Prophet, Allah has already aided him when those who disbelieved had driven him out [of Mecca] as one of two, when they were in the cave and he said to his companion, 'Do not grieve; indeed Allah is with us.'

— Quran 9:40

A Plot Against His Life

With the Second Pledge of Aqabah sealed, the Prophet ﷺ quietly began instructing his followers in Mecca to emigrate to Yathrib, and over some weeks most of the Muslim community slipped away in small groups until barely any remained but the Prophet ﷺ himself, Abu Bakr, and Ali ibn Abi Talib. Quraysh's leaders, alarmed at losing their grip on him and fearing the growing strength gathering in the north, met in council and settled on a chillingly practical solution: rather than risk the blood-feud that would follow if one clan killed him, they would select a young, strong man from every clan of Quraysh to strike him together, so that responsibility for his death would be too diffuse for Banu Hashim to avenge against any single family.

Ali's Night in the Prophet's Bed

Informed of the plot, the Prophet ﷺ asked Ali (RA) to remain behind in Mecca, lie in his bed wrapped in his green cloak, and return the various trusts and property that Meccans, despite their hostility, had continued to leave in the Prophet's ﷺ safekeeping — a quiet testament to the reputation for honesty he had never lost even among his fiercest opponents. That night the assassins surrounded the house, watching the sleeping figure through a crack, waiting for dawn to strike together. When they finally burst in, they found Ali rising from the bed instead, and their target already gone. It was one of the earliest and most striking acts of courage in the young Muslim community's history.

The Journey to Thawr

The Prophet ﷺ left his house that night, reciting verses of the Quran and, tradition holds, passing unnoticed through the very men waiting to kill him. He made his way to the home of Abu Bakr al-Siddiq, his closest friend since before prophethood, and the two set out together — not north toward Yathrib as Quraysh would expect, but south, to the cave of Thawr, where they hid for three days while Meccan search parties combed the surrounding hills. Abu Bakr's son Abdullah brought them news each night, his daughter Asma bint Abi Bakr brought food, tearing her waistband in two to tie the provisions, earning her the title 'Dhat al-Nitaqayn,' the one with two belts.

Trust in God at the Cave's Mouth

At one point search parties came close enough to the mouth of the cave that Abu Bakr, fearing for the Prophet's ﷺ safety, whispered that if any of them merely looked down at their feet they would see them. The Prophet ﷺ answered with the calm that marked his trust in God throughout his life: 'What do you think of two, when God is their third?' This moment is preserved directly in the Quran, where God describes him saying to his companion, 'Do not grieve; indeed God is with us' — a verse Muslims have recited for guidance in fear ever since.

Guided by a Pagan Tracker

When the search cooled, the two set out again, guided not by a fellow believer but by Abdullah ibn Uraiqit, a skilled desert guide from a clan still outside Islam whom Abu Bakr had nonetheless trusted with their lives, an arrangement showing the Prophet's ﷺ practical wisdom in using the most capable hand available regardless of creed. They took an unconventional coastal route to avoid Quraysh patrols, riding for days across difficult terrain. Along the way, a bounty-hunter named Suraqah ibn Malik pursued them hoping to claim the reward Quraysh had placed on the Prophet's ﷺ head, only to have his horse's legs sink into the sand each time he drew near — an experience that so unsettled him that he begged forgiveness and turned back, later becoming a Muslim himself.

Arrival in Quba and Madinah

The travelers reached Quba, on the outskirts of Yathrib, where the Prophet ﷺ paused for several days and laid the foundation of a mosque, the first built in Islam. Word of his approach had already spread, and when he finally rode into the heart of the city, its people poured into the streets to receive him, some say singing verses of welcome that are still recited today. Yathrib would soon be renamed Madinat al-Nabi, the City of the Prophet, simply Madinah. So pivotal was this migration, the Hijrah, that decades later the second caliph Umar ibn al-Khattab chose it, not the Prophet's ﷺ birth or the first revelation, as the starting point of the Islamic calendar.

In a cave, two frightened men and a whispered promise of God's nearness became the quiet turning point from which an entire calendar, and an entire civilization, would one day be counted.

Sira reports can differ in chronology and detail. Read narrative claims with the cited Quranic passage and the site's editorial methodology in view.

Your next step

Continue your journey at Baby Steps Islam

Visit Baby Steps Islam