The Prophet (PBUH) was 53 years of age at the time of the Hijra that marks the first day and year of the Islamic calendar. The migration lead him to Yathrib where he spent the remaining 10 years of his life. In Yathrib the divine message entered its last and decisive stage that would lay the foundation for Islam spreading throughout the world.
The Romans had expelled the Jews from Syria and Palestine in the 2nd Century B.C. Some of these Jews had migrated to Yathrib where they built strong fortresses. Yathrib was therefore a mix of mainly Jews and other culturally and religiously diverse tribes that lived together in peace that provided a open atmosphere for freedom of religion.
The Yathribites were not foreign to the idea of unity under one God, a message that had been previously put forward by the Jews. The Judaic religion also taught that a Prophet was to come that was also believed by the Christian monks, most famously Buhaira that met the Prophet (PBUH) when he was 12 years old. Yathrib therefore changed its name to Medinat-Al-Nabi (City of the Prophet) or Al-Medina Al-Munawara (The Illuminated City), or Medina for short.
The Jew could not help shouting at the top of his voice: ‘O you Arabs! Here is your great man whom you have been waiting for!’ So all the Muslims rushed to their arms and received Allah’s Messenger on the summit of Harra. The Prophet turned with them to the right and alighted at the quarters of Bani Amr Ibn ‘Auf, and this was on Monday in the month of Rabi-ul-Awal.
Excerpt from Muhammad by Alim.org
The Muhajireen (the emigrants) were the Muslims that took flight alongside the Prophet (PBUH) towards Medina. They had become muslims in its formative years when it was contained within Mecca. The inhabitants of Medina, the Ansar, believed in the message of Islam and that the Prophet Muhammad (PBUH) was truly a messenger from God. To ensure continued cooperation between the Muhajireen and the Anser, the Prophet (PBUH) joined one of each together in a tie of “Brotherhood”.
And the first forerunners [in the faith] among the Muhajireen and the Ansar and those who followed then with good conduct – Allah is pleased with them and they are pleased with Him, and He has prepared for them gardens beneath which rivers flow, wherein they will abide forever. That is the great attainment.
9:100 The Holy Quran from Quran.org translation by Sahih International
The Prophet (PBUH) also drafted a treaty between the Muslims and Jews of Medina to ensure safety for both parties. The Document read something like this:
The state of peace and war shall be common to all Muslims; none among them shall have the right of concluding peace with, or declaring war against, the enemies of his co-religionists. The Jews who enter into this covenant shall be protected from all insults and vexations; they shall have an equal right with our own people to our assistance and good offices. The Jews of the various branches of ‘Awf, Najjar, al-Harith, Jashm, Tha’labah, Aws, and all others domiciled in Yathrib shall form with the Muslims one composite nation. They shall practice their religion as freely as the Muslims.
The clients and allies of the Jews shall enjoy the same security and freedom. The guilty shall be pursued and punished. The Jews shall join the Muslims in defending Yathrib against all enemies. The interior of Yathrib shall be a sacred place for all those who accept this Charter. The clients and allies of the Muslims and of the Jews shall be as respected as the principals. All Muslims shall hold in abhorrence anyone found guilty of a crime, injustice, or disorder. None shall uphold the culpable, even if he may be his nearest in kinship.
Excerpt from The Holy Prophet by Sayyid Saeed Akhtar Rizvi
Not long after the flight to Medina, the first mosque was built by the Muslims who had just emerged from the Meccan oppressive regime. The mosque became a centre for gatherings, praying, learning the Quran, and a headquarter disputes were settled and problems were solved according to Islamic law. The Prophet Muhammad (PBUH) utilised the new mosque to lead daily prayers, deliver sermons, and teach the Quran and the divine laws within it, as well as discourse with his companions about the meaning and future of Islam.
There were still some agitation from some Jewish Yathribites that colluded with the polytheist Quraish tribe in Mecca to stamp out Islam. The Quraishites were furious after the Prophet Muhammad (PBUH) had slipped away from them the same night he was to be assassinated. The news that Islam was growing steadfast in Medina further ignited their hate and rage against the Prophet (PBUH) and his followers.
Prophet Muhammad – A Brief Biography by Al-Balagh Foundation
Muhammad, Messenger of Peace and Tolerance by Yasin T. Al-Jibouri