Narrated Urwa Ibn Az-Zubair: "Allah's Messenger met Az-Zubair in a caravan of Muslim merchants who were returning from Sham. Az-Zubair provided Allah's Messenger and Abu Bakr with white clothes to wear. When the Muslims of Medina heard the news of the departure of Allah's Messenger from Mecca (towards Medina), they started going to the Harra every morning. They would wait for him till the heat of the noon forced them to return. One day, after waiting for a long while, they returned home, and when they went into their houses, a Jew climbed up to the roof of one of the forts of his people to look for something, and he saw Allah's Messenger and his companions, dressed in white clothes, emerging out of the desert mirage.
"The Jew could not help shouting at the top of his voice: '0 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.
Abu Bakr stood up, receiving the people, while Allah's Messenger sat down and kept silent. Some of the Ansar who came and had not seen Allah's Messenger before began greeting Abu Bakr, but when the sunshine fell on Allah's Messenger and Abu Bakr came forward and shaded him with his sheet, only then the people came to know Allah's Messenger. Allah's Messenger stayed with Bani Amr Ibn Auf for ten nights and established the mosque (Mosque of Quba) which was founded on piety. Allah's Messenger prayed in it and then mounted his she-camel and proceeded on, accompanied by the people till his she-camel knelt down at (the place of) the Mosque of Allah's Messenger at Medina.
Some Muslims used to pray there in those days, and that place was a yard for drying dates belonging to Suhail and Sahl, the orphan boys who were under the guardianship of Asad Ibn Zurara. When his she-camel knelt down, Allah's Messenger said: 'This place, Allah willing, will be our abiding place.' Allah's Messenger then called the two boys and told them to suggest a price for that yard so that he might take it as a mosque. The two boys said: 'No, but we will give it as a gift, 0 Allah's Messenger!" Allah's Messenger then built a mosque there.
The Prophet himself started carrying unburnt bricks for its building and while doing so, he was saying: 'This load is better than the load of Khaibar, for it is more pious in the Sight of Allah and purer and better rewardable.' He was also saying: '0 Allah! The actual reward is the reward in the Hereafter, so bestow Your Mercy on the Ansar and the Emigrants.' Thus the Prophet recited (by way of proverb) the poem of some Muslim poet whose name is unknown to me." (Ibn Shibab said, "In the hadiths it does not occur that Allah's Messenger recited a complete poetic verse other than this one)."
Thus was accomplished the hijrah, or the flight of Muhammad as called in European annals, from which the Islamic calendar dates.
When the Prophet Muhammad and his companions settled at Yathrib, this city changed its name, and henceforth was called, Al-Medina Al-Munawara, The Illuminated City, or more shortly, Medina, The City. It is situated about eleven day's journey to the north of Mecca. At that time it was ruled by two Kahtanite tribes, Aws and Khazraj. These two tribes, however, were constantly quarreling among themselves. It was only about the time when the Prophet announced his mission at Mecca that these tribes, after long years of continuous warfare, entered on a period of comparative peace. When the Prophet settled at Medina, the tribes of Aws and Khazraj forgot entirely their old feuds and were united together in the bond of Islam.
Their old divisions were soon effaced and the "Ansar", the Helpers of the Prophet, became the common designation of all Medinites who had helped the Prophet in his cause. Those who emigrated with him from Mecca received the title of "Muhajereen" or The Emigrants. The Prophet, in order to unite both classes in closer bonds, established between them a brotherhood which linked them together as children of the same parents, with the Prophet as their guardian.
The first step the Prophet took, after his settlement at Medina, was to build a mosque for the worship of Allah according to principles of Islam. Also, houses for the accommodation of the emigrants were soon erected.
Medina and its suburbs were at this time inhabited by three distinct parties, the Emigrants, the Helpers, and the Jews.
In order to weld them together into an orderly federation, the Prophet granted a charter to the people, clearly defining their rights and obligations. This charter represented the framework of the first commonwealth organized by the Prophet. It started thus: "In the name of the Most Merciful and Compassionate Lord, this charter is given by Muhammad, the Messenger of Allah to all believers, whether of Quraish or Medina, and all individuals of whatever origin who have made common cause with them, who shall all constitute one nation."
The following are some extracts from the charter: The state of peace and war shall be common to all Muslims; no one among them shall have the right of concluding peace with, or declaring war against, the enemies of his co-religionists. The Jews who attach themselves to our commonwealth 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 and all others domiciled in Medina shall form with the Muslims one composite nation; they shall practice their religion as freely as the Muslims. The 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 Medina against all enemies. The interior of Medina shall be a sacred place for all who accept this charter. All true Muslims shall hold in abhorrence every man guilty of crime, injustice or disorder; no one shall uphold the culpable, though he be his nearest kin.
After dealing with the interior management of the State, the charter concluded as follows: "All future disputes arising among those who accept this charter shall be referred, under Allah to the Prophet."
Thus this charter put an end to the state of anarchy that prevailed among the Arabs. It constituted the Prophet Muhammad as chief magistrate of the nation.
The party of the Ansars, or Helpers, included some lukewarm converts who retained an ill-concealed predilection for idolatry. These were headed by Abdullah Ibn Ubai, a man with some claims to distinction. They ostensibly joined Islam, but in secret were disaffected. They often were a source of considerable danger to the newborn commonwealth and required unceasing watchfulness on the part of the Prophet. Towards them he always showed the greatest patience and forbearance, hoping in the end to win them over to the faith, which expectations were fully justified by the result. With the death of 'Abdullah Ibn Ubai, his party which were known as the party of the "Munafiqeen" (the Hypocrites) disappeared.
The Jews who constituted the third party of the Medinites were, however, the most serious element of danger. No kindness or generous treatment on the part of the Prophet would seem to satisfy them. They soon broke off and ranged themselves with the enemies of the new faith. They did not hesitate to declare openly that they preferred idolatry, with its attendant evils, to the faith of Islam. Thus, the Prophet had to keep an eye on his enemies outside Medina, on the one hand, and those within the city on the other. The Meccans who had sworn Muhammad's death were well acquainted, thanks to the party of the Hypocrites and of the Jews at Medina, with the real forces of the Muslims. They also knew that the Jews had accepted Muhammad's alliance only from motives of temporary expendience and that they would break away from him to join the idolaters as soon as the latter showed themselves in the vicinity of Medina. The safety of the state required the proscription of the traitors who were secretly giving information to the common enemy. About six men were executed for high treason of this nature.