Muhammad's significance is the result of his dual roles as God's messenger and as the perfect living model of the Quran's teachings. After 10 years of persecution and resistance in Mecca, Muhammad and the early Muslims moved to Medina, where Muhammad served as prophet, political ruler, military commander, chief judge, and lawgiver.