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 the Eurymedon with the decisive Athenian victory at the Battle of Marathon. Between the two invasions, Darius died, and responsibility for the war passed to his son Xerxes I. Xerxes then led the second invasion personally in 480 BC, taking an enormous (although oft-exaggerated) army and navy to Greece. Those Greeks who chose to resist (the 'Allies') were defeated in the twin battles of Thermopylae and Artemisium on land and at sea respectively. All of Greece except the Peloponnesus thus fell into Persian hands, but then seeking to finally destroy the Allied navy, the Persians suffered a decisive defeat at the Battle