The Umayyad Caliphate was one of the most powerful and influential empires in Islamic history. It lasted from 661 to 750 CE, and it was ruled by a dynasty of Arab leaders who traced their ancestry to Umayya, a prominent merchant of Mecca. The Umayyads expanded the Muslim territory to include North Africa, Spain, Central Asia, and parts of India. They also built magnificent mosques, palaces, and public works, such as the Great Mosque of Damascus and the Dome of the Rock in Jerusalem. The Umayyad Caliphate faced many challenges and conflicts, both internal and external. They had to deal with rebellions from different sects and groups within Islam, such as the Shiites, the Kharijites, and the Alids. They also had to fight against the Byzantine Empire, which was still a major rival in the Mediterranean region. The Umayyad Caliphate eventually collapsed in 750 CE, when a revolt led by the Abbasids overthrew them and established a new caliphate. The Abbasids claimed to be descendants of Muhammad's uncle Abbas, and they accused the Umayyads of being corrupt and un-Islamic. However, some members of the Umayyad family escaped to Spain, where they founded a separate caliphate that lasted until 1031 CE.