Islam originated with the revelation of the Koran in 610 B.C. to the 40-year-old prophet Muhammad while he was living in the city of Mecca on the Arabian Peninsula. He began to convert people of the city to Islam during the next 12 years.
The growing presence of Muslims in the city caused non-Muslims to persecute the followers of the religion, eventually driving them from the city. The prophet and his followers left Mecca in 622 B.C. and settled in Medina, originally known as Yathrib. There, the religion grew in influence and numbers. In 630 B.C., the Muslims of Medina returned to Mecca and peacefully assumed control of the city, dedicating the once-pagan icon of the Kaaba to Allah.