The Constitution of Medina (Arabic: دستور المدينة, Ṣaḥīfat al-Madīnah), also known as the Charter of Medina, was drafted by the prophet Muhammad. It constituted a formal agreement between Prophet Muhammad and all of the significant tribes and families of Yathrib (later known as Medina), includingMuslims, Jews, Christians and pagans. This constitution formed the basis of the first Islamic state. The document was drawn up with the explicit concern of bringing to an end the bitter inter tribal fighting between the clans of the Aws (Aus) and Khazraj within Medina. To this effect it instituted a number of rights and responsibilities for the Muslim, Jewish, Christian and pagan communities of Medina bringing them within the fold of one community—the Ummah.
The precise dating of the Constitution of Medina remains debated but generally scholars agree it was written shortly after the Hijra (622). It effectively established the first Islamic state. The Constitution established: the security of the community, religious freedoms, the role of Medina as a haram or sacred place (barring all violence and weapons), the security of women, stable tribal relations within Medina, a tax system for supporting the community in time of conflict, parameters for exogenous political alliances, a system for granting protection of individuals, a judicial system for resolving disputes, and also regulated the paying of blood money (the payment between families or tribes for the slaying of an individual in lieu of lex talionis).
In the last years of Muhammad in Mecca, a delegation from Medina, consisting of the representatives of the twelve important clans of Medina, invited Muhammad as a neutral outsider to Medina to serve as the chief arbitrator for the entire community. There was fighting in Medina mainly involving its pagan and Jewish inhabitants for around a hundred years before 620. The recurring slaughters and disagreements over the resulting claims, especially after the battle of Bu’ath in which all the clans were involved, made it obvious to them that the tribal conceptions of blood-feud and an eye for an eye were no longer workable unless there was one man with authority to adjudicate in disputed cases. The delegation from Medina pledged themselves and their fellow-citizens to accept Muhammad into their community and physically protect him as one of themselves.
After emigration to Medina, Muhammad drafted the Constitution of Medina, “establishing a kind of alliance or federation” among the eight Medinan tribes and Muslim emigrants from Mecca, which specified the rights and duties of all citizens and the relationship of the different communities in Medina (including that of the Muslim community to other communities, specifically the Jews and other “Peoples of the Book“).
Scholars do not possess the original document but rather a number of versions can be found in early Muslim sources. The most widely read version of the Constitution is found in the pages of Ibn Ishaq‘s Sirah Rasul Allah (see wikisource), while alternative copies are located in Sayyid al-Nas and Abu ‘Ubayd’sKitab al-Amwal. Most scholars accept the authenticity of the document.
Montgomery Watt suggests that the constitution must have been written in the early Medinan period. He supports his view by arguing that had the document been drafted later, it would have had a favorable attitude towards Quraysh, and given Muhammad a prominent place. Hubert Grimme believes the Constitution was drafted in the post-Badr period, while Cetani argues that the document was complete before the Battle of Badr.
According to RB Serjeant, verses 101–4 of sura 3 of the Qur’an make reference to the Constitution. He proposes that this section of the Qur’an underwentrecension (a hypothesis first proposed by Richard Bell). In its first recension, this text sanctioned the establishment of a confederation. In its second, it admonished the Aws and Khazraj to abide by their treaty. In its third, in conjunction with the proceeding verses, it is an encouragement of Muhammad’s adherents to face the Meccan forces they eventually fought at Uhud. He states that even if this proposal of three recensions be unacceptable, it must be affirmed that these verses make reference to the two different treaties.
Bernard Lewis claims that the Constitution was not a treaty in the modern sense, but a unilateral proclamation by Muhammad. One of the constitution’s more interesting aspects was the inclusion of the Jewish tribes in the Ummah because although the Jewish tribes were “one community with the believers,” they also “have their religion and the Muslims have theirs.”
Legal Scholar L. Ali Khan says the Constitution of Medina was a social contract derived from a treaty and not from any fictional state of nature or from behind the Rawlsian veil of ignorance. The contract was built upon the concept of one community of diverse tribes living under the sovereignty of one God.
The first ever “Constitutional Analysis” of the Constitution of Medina was done by Islamic Scholar Dr Muhammad Tahir-ul-Qadri. He analysed the Constitution of Medina and formed 63 articles; he argues that it is the first written constitution. He has published a e-book of the 63 constitutional articles.
The Medina Constitution also instituted peaceful methods of dispute resolution among diverse groups living as one people but without assimilating into one religion, language, or culture. Welch in Encyclopedia of Islam states: “The constitution reveals his Muhammad‘s great diplomatic skills, for it allows the ideal that he cherished of an ummah (community) based clearly on a religious outlook to sink temporarily into the background and is shaped essentially by practical considerations.”
Significance of the Ummah 
Another important feature of the Constitution of Medina is the redefinition of ties between Muslims. The Constitution of Medina sets faith relationships above blood-ties and emphasizes individual responsibility. Tribal identities are still important, and are used to refer to different groups, but the “main binding tie” for the newly-created ummah is religion. This contrasts with the norms of pre-Islamic Arabia, which was a thoroughly tribal society, although Serjeant postulates the existence of earlier theocratic communities. According to Denny, “Watt has likened the Ummah as it is described in the document to a tribe, but with the important difference that it was to be based on religion and not on kinship”. This is an important event in the development of the small group of Muslims in Medina to the larger Muslim community and empire.
Rights of non-Muslims 
The non-Muslims included in the ummah had the following rights:
- The security of God is equal for all groups,
- Non-Muslim members have equal political and cultural rights as Muslims. They will have autonomy and freedom of religion.
- Non-Muslims will take up arms against the enemy of the Ummah and share the cost of war. There is to be no treachery between the two.
- Non-Muslims will not be obliged to take part in religious wars of the Muslims.