quality:corruption
Migration to Medina (Hijrah)

As resistance to his proselytism in Mecca grew, Muhammad began to limit his efforts to non-Meccans who attended fairs or made pilgrimages. During this period, Muhammad had an encounter with six individuals from the Banu Khazraj. These men had a history of raiding Jews in their locality, who in turn would warn them that a prophet would be sent to punish them. On hearing Muhammad's religious message, they said to each other, "This is the very prophet of whom the Jews warned us. Don't let them get to him before us!" Upon embracing Islam, they returned to Medina and shared their encounter, hoping that by having their people—the Khazraj and the Aws, who had been at odds for so long—accept Islam and adopt Muhammad as their leader, unity could be achieved between them.

The next year, five of the earlier converts revisited Muhammad, bringing with them seven newcomers, three of whom were from the Banu Aws. At Aqaba, near Mecca, they pledged their loyalty to him. Muhammad then entrusted Mus'ab ibn Umayr to join them on their return to Medina to promote Islam. Come June 622, a significant clandestine meeting was convened, again at Aqaba. In this gathering, seventy-five individuals from Yathrib (Medina) attended, including two women, representing all the converts of the oases. Muhammad asked them to protect him as they would protect their wives and children. They concurred and gave him their oath, commonly referred to as the second pledge of Aqaba or the pledge of war. Paradise was Muhammad's promise to them in exchange for their loyalty.

Subsequently, Muhammad called upon the Meccan Muslims to relocate to Medina. This event is known as the Hijrah, which basically means "severing of kinship ties." The departures spanned approximately three months. To avoid arriving in Medina by himself with his followers remaining in Mecca, Muhammad chose not to go ahead and instead stayed back to watch over them and persuade those who were reluctant. Some were held back by their families from leaving, but in the end, there were no Muslims left in Mecca.

Islamic tradition recounts that in light of the unfolding events, Abu Jahl proposed a joint assassination of Muhammad by representatives of each clan. Having been informed about this by the angel Gabriel, Muhammad asked his cousin Ali to lie in his bed covered with his green hadrami mantle, assuring that it would safeguard him. That night, the group of planned assassins approached Muhammad's home to carry out the attack but changed their minds upon hearing the voices of Sawdah and some of Muhammad's daughters, since it was considered shameful to kill a man in front of the women in his family. They instead chose to wait until Muhammad left the house the next morning; one of the men peeked into a window and saw what he believed to be Muhammad (but was actually Ali dressed in Muhammad's cloak), though unbeknownst to them, Muhammad had previously escaped from the back of the residence. When Ali went outside to go for a walk the following morning, the men realized they had been fooled, and the Quraysh consequently offered a 100-camel bounty for the return of Muhammad's body, dead or alive. After staying hidden for three days, Muhammad subsequently departed with Abu Bakr for Medina, which at the time was still named Yathrib; the two men arrived in Medina on 4 September 622. The Meccan Muslims who undertook the migration were then called the Muhajirun, while the Medinan Muslims were dubbed the Ansar.