The first Islamic state was established by the Islamic prophet Muhammad in Medina in 622 under the Constitution of Medina. It represented the political unity of the Muslim Ummah (nation). After Muhammad's death, his companions known as the Rightly Guided Caliphs (Rashidun) founded the Rashidun Caliphate (632–661), which began massive expansion and motivated subsequent Islamic states, such as the Umayyad Caliphate (661–750) and Abbasid Caliphate (750–1258).
Muhammad came to the city of Medina following the migration of his followers in what is known as the Hijrah (migration to Medina) in 622. He had been invited to Medina by city leaders to adjudicate disputes between clans from which the city suffered, and was received positively by the city's Jewish and pagan residents as an arbitrator. As a result, he was accepted by popular consensus as the city's political leader, establishing the first Islamic state with his role.