As soon as Muhammad the Prophet migrate to Medina (originally named Yathrib but later changed to Medina — abbreviation of Madinatunnabi or The City of Prophet), he appointed as the leader in that plural society which comprise 60% of non-muslim (pagan, arab-jews, arab-christian) and with only 40% of muslim. read more
Some of the tribes in Mecca were hostile against Muhammad, hence he and his followers escaped persecution by migrating to Medina (then known as Yathrib) in the year 622 A.D. This event is known as the "Hijra" and marks the beginning of the Islamic calendar. read more