The Umayyad dynasty (Banū Umayya) or Umayyads (al-Umawiyyūn) was an Arab clan within the Quraysh tribe who were the ruling family of the Caliphate between 661 and 750 and later of al-Andalus between 756 and 1031. In the pre-Islamic period, they were a prominent clan of the Meccan tribe of Quraysh, descended from Umayya ibn Abd Shams. Despite staunch opposition to the Islamic prophet Muhammad, the Umayyads embraced Islam before the latter's death in 632. Uthman, an early companion of Muhammad from the Umayyad clan, was the third Rashidun caliph, ruling in 644–656, while other members held various governorships. One of these governors, Mu'awiya I of Syria, opposed Caliph Ali in the First Muslim Civil War (656–661) and afterward founded the Umayyad Caliphate with its capital in Damascus. This marked the beginning of the Umayyad dynasty, the first hereditary dynasty in the history of Islam, and the only one to rule over the entire Islamic world of its time.
Umayyad authority was challenged in the Second Muslim Civil War, during which the Sufyanid line of Mu'awiya was replaced in 684 by Marwan I, who founded the Marwanid line of Umayyad caliphs, which restored the dynasty's rule over the Caliphate. The Islamic empire reached its largest geographical extent under the Umayyads. The Umayyads drove on the early Muslim conquests, conquering the Maghreb, Hispania, Central Asia, Sind, and parts of Chinese Turkestan, but the constant warfare exhausted the state's military resources, while Alid and Kharijite revolts and tribal rivalries weakened the state from within. Finally, in 750 the Abbasids overthrew Caliph Marwan II and massacred most of the family. One of the survivors, Abd al-Rahman, a grandson of Caliph Hisham ibn Abd al-Malik, escaped to Muslim Spain, where he founded the Emirate of Córdoba, which his descendant, Abd al-Rahman III, transformed into a caliphate in 929. Under the Umayyads, Al-Andalus became a centre of science, medicine, philosophy and invention during the Islamic Golden Age.