Islam migrants ("Muhajirun"), Muhammad in Medina established his political and religious authority. The Constitution of Medina was formulated, instituting 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 Constitution established: All the tribes signed the agreement to defend Medina from all external threats and to live in harmony amongst themselves. Within a few years, two battles took place against the Meccan forces: first, the Battle of Badr in 624 – a Muslim victory, and then a year later, when the Meccans returned to Medina,
Battle of Uhud opposition from the rest of the Quraysh, the tribe that ruled Mecca and to which he belonged. The Muslims fled Mecca in 622 after years of persecution and established themselves at Medina (formerly known as "Yathrib"; Medina means "City"). The Quraysh had seized the properties and families of Muslims in Mecca and dispatched caravans to Damascus which the Muslims intercepted and raided. The Meccans sent out a small army to punish the Muslims and stop their raiding. At the Battle of Badr in 623, a small Muslim force defeated the much larger Meccan army. Many Muslims considered this unexpected victory