All the Muslims of Makkah had departed except, Rasulullah , Hazrat Abu Bakr (R.A.) and the youthful Hazrat Ali (R.A.). The Quraish were furious since they were not able to stop the mass exodus of Muslims to Madinah. They pondered over urgent ways and means to stop Rasulullah from leaving Makkah.
A big conference of the leaders of Quraish was held at Dar-un-Nadwah and many resolutions were tabled to decide the issue. But, even the idea of banishment or exile of Rasulullah was not entertained. One leader of the Quraish, Sheikh Najdy, suggested that every sign of Islam should be wiped off from the land of Arabia.
The assassination of Rasulullah was the only way out for the Quraish. One youth from each clan was chosen to set upon Rasulullah so that the Banu Hashim would not be able to hold any particular Quraish clan responsible for his death. It was decided to kill Rasulullah that same night.
While Hazrat Abu Bakr (R.A.) made all secret arrangements for the Hijrat, Hazrat Jibra'eel (A.S.) forewarned Rasulullah of the intention of the Quraish that night. Hazrat Ali (R.A.) slept in Rasulullah 's bed while Hazrat Abu Bakr (R.A.) and Rasulullah left Makkah unnoticed and took refuge in the Cave of Thoor which was about seven kilometers from Makkah. Rasulullah recited Sura Ya'seen before he left Makkah. He had also instructed Hazrat Ali (R.A.) to return all the goods and property, which he had held in trust, to the rightful owners.
After a whole night's vigil on the house of Rasulullah , the Quraish were shocked in the morning to find only Hazrat Ali (R.A.) in the bed of Rasulullah . They began a desperate search of the countryside around Makkah and offered huge rewards for the capture of Rasulullah ,dead or alive.
The enemy was almost at the mouth of the Cave of Thoor. The fears of Hazrat Abu Bakr (R.A) were set aside by the assurance of Rasulullah that 'Allah is with us'
By a divine miracle, a spider had spun a web over the mouth of the cave and a pigeon had laid eggs in the nest close by. The cave looked undisturbed.
After three days, when it was felt safe to continue the Hijrat, Rasulullah mounted his camel AL-QASWA while Hazrat Abu Bakr ( R.A.) and his assistant Hazrat Aa'mir-bin- Faheerah (R.A.) shared another mount. Abdullah-bin- Urayqit who was their guide, led the way towards Madinah. They followed a path which was not frequented by regular caravans.
At one stage, a Quraishi horseman spotted them. His name was Suraaqah and his immediate thought were of the hugh reward offered for the capture of Rasulullah . But each time he charged, his horse's feet sank into the sand, and ultimately, he squirmed and shivered and asked forgiveness of Rasulullah
On the sixth day of Hijrat, they reached Qubah on the border of Madinah. This was on 8th of Rabi-ul-Awwal, thirteen years after Nabuwwat. Rasulullah stayed as the guest of Hazrat Kulsoom-bin-Hidum while Hazrat Abu Bakr (R.A.) stayed at the house of Hazrat Habeeb-bin-Assaf (R.A.). During this very short stay in Qubah, Rasulullah laid the foundation of the first mosque in Islam.
On Friday 12th of Rabi-ul-Awwal, Rasulullah proceeded to Madinah and when it was time for Zohr prayer, he led the first Jum'a Namaaz with a hundred worshippers in an open field in the locality of Banu Saalim. After Namaaz, he mounted his camel again and proceeded further till he entered into Madinah the same evening. Every Muslim wanted to be his host. But his mount was under Divine Command and he vowed to stop only where his camel would stop. At length, the camel stopped near the house of Hazrat Abu Ayyub Ansari (R.A.) who welcomed Rasulullah to his house.
The emigrant Muslims then living in Madinah were known as the 'Muhajirin' while the Muslims who offered their hospitality to the Muhajirin were known as 'Ansaar'. The Muslim Calendar began in this same year of Hijra.