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,
Military career of Muhammad in their favour. Afterwards the two armies exchanged arrow fire, before finally clashing. According to the Quran, thousands of angels descended from heaven and participated in the battle, being instructed by Allah to "smite the [Meccan warrior's] necks and smite of them each finger." According to another Quranic verse, Allah fought and killed the Meccans representatively for the Muslim warriors. The Meccan army eventually collapsed soon after the horse of Abu Jahl was brought down, resulting in the first major Muslim victory. This victory must not so much be ascribed to divine intervention as is done in the Islamic sources,