The Hijra to Madinah
الهجرة إلى المدينة
After 13 years of persecution in Mecca, Allah permitted the Prophet ﷺ and his companions to migrate to Madinah. The Hijra marks such a pivotal turning point that Umar RA later made it the beginning of the Islamic calendar.
The Account
Permission to Migrate
After years of persecution and failed attempts to find a new base (including the journey to Ta'if), Allah granted permission to migrate. The Ansar (Helpers) of Madinah had pledged support at the two Pledges of Aqabah (~621–622 CE).
Allah revealed:
*"Indeed, those who have believed and emigrated and fought with their wealth and lives in the cause of Allah and those who gave shelter and aided — they are allies of one another."* (Al-Anfal: 72)
The Plot to Kill the Prophet ﷺ
The leaders of Quraysh convened at Dar al-Nadwah and plotted to kill the Prophet ﷺ before he could leave. They agreed to send one man from each clan simultaneously so that responsibility for the blood would be distributed and Banu Hashim could not take revenge. Allah informed His Prophet ﷺ of the plot.
The Prophet ﷺ asked Abu Bakr RA to accompany him. He appointed Ali ibn Abi Talib RA to sleep in his bed, wrapped in his green cloak, to deceive the plotters — and to return the valuables that had been entrusted to the Prophet ﷺ for safekeeping (even his enemies trusted him with their property).
The Journey: Mecca to Cave Thawr
The Prophet ﷺ left his home at night, reciting the beginning of Surah Yasin, and walked through the plotters surrounding his home — none could see him. He joined Abu Bakr RA and they travelled south (away from Madinah) to Cave Thawr to escape pursuit.
They remained in the cave for three nights. Quraysh sent search parties. A tracker reached the cave's entrance, but Allah caused a spider to spin a web and a pigeon to nest at the entrance — giving the appearance that no one had entered.
Abu Bakr RA whispered anxiously: "If any of them looks down at his feet, he will see us."
The Prophet ﷺ replied: "O Abu Bakr, what do you think of two people with whom the third is Allah?"
Allah revealed this moment:
*"...when they were in the cave and he said to his companion: 'Do not grieve; indeed Allah is with us.' And Allah sent down his tranquillity upon him and supported him with soldiers [angels] you did not see."* (At-Tawbah: 40)
Arrival in Madinah — 1 AH
After the cave, they journeyed northward. The Muslims of Madinah had been waiting anxiously. When the news of his arrival spread, men, women, and children came out joyfully to welcome him. The women sang:
"Tala'a al-Badru 'alayna / min thaniyyat al-wada'" "The full moon has risen over us / from the valley of Wada'"
The Prophet ﷺ was hosted in Quba, south of Madinah, for a few days, where he laid the foundation of the first mosque in Islam — Masjid Quba.
He then entered Madinah proper. Every family invited him to stay with them. He let his camel walk freely and said he would stay wherever it stopped. The camel knelt at the land of two orphan boys from Banu Najjar. The Prophet ﷺ purchased the land, and Masjid al-Nabawi was built there.
Why the Hijra Is So Significant
- It marks the transition from a persecuted minority to an established community - It was the beginning of Islamic governance, legislation, and brotherhood - Umar ibn al-Khattab RA, during his caliphate, chose the year of Hijra as the beginning of the Islamic calendar (AH — Anno Hegirae) - The Prophet ﷺ said: "Iman (faith) is Yemeni, and wisdom is Yemeni" — in praise of the Ansar, most of whom were from Madinah
Hadith References
"Abu Bakr said: "I said to the Prophet ﷺ while we were in the cave: 'If any of them were to look at his feet he would see us.' The Prophet ﷺ said: 'O Abu Bakr, what do you think of two people with whom the third is Allah?'""
Relevance: The famous exchange in Cave Thawr — the verse of At-Tawbah: 40 refers to this moment
"The Prophet ﷺ said: "There is no Hijra after the Conquest [of Mecca], but there is jihad and intention, and if you are called to go out, then go out.""
Relevance: Shows that physical Hijra from Mecca ended with the Conquest, but the principle of migrating for Allah's sake continues
Scholar Views
"The Hijra was the turning point between two phases of Islam. In Mecca, Muslims endured and were patient. In Madinah, they established, built, and prevailed. Had the Hijra not happened, Islam may have been extinguished. It was the will of Allah that the community have a home."
Zad al-Ma'ad, Vol. 3, Chapter on the Hijra
"The spider web and the dove's nest at Cave Thawr are authentic — established in Tafsir and Seerah sources. They were among the miracles (mu'jizat) of the Prophet ﷺ — Allah protected His Messenger and His companion through the most ordinary of means."
Al-Bidaya wa'l-Nihaya, Vol. 3; Tafsir At-Tawbah: 40
Key Lessons
- ◆Hijra (migration for Allah's sake) is one of the greatest acts of sacrifice in Islam
- ◆Taking precautions and having tawakkul (reliance on Allah) are not contradictory — the Prophet ﷺ took a disguised route AND trusted in Allah
- ◆The Ansar's welcome is a model of brotherhood — they shared homes, wealth, and livelihoods with strangers for Allah's sake
- ◆Masjid Quba — the first mosque — shows that establishing prayer and worship spaces is the first priority of any Muslim community
Sources
- •Ar-Raheeq Al-Makhtum — Safiur Rahman Mubarakpuri
- •Al-Bidaya wa'l-Nihaya — Ibn Kathir
- •Zad al-Ma'ad — Ibn al-Qayyim
← Back to Seerah Timeline