The Abbasid Caliphate was the third of the Islamic caliphates to succeed the Islamic prophet Muhammad. The Abbasid dynasty descended from Muhammad's uncle, Al-Abbas ibn Abd al-Muttalib (566-653 CE), from whom the dynasty takes its name. They ruled as caliphs for most of their period from their capital in Baghdad, after assuming authority over the Muslim empire from the Umayyads in 750 CE. Overtime the political authority of the caliphs weakened and they ceded authority to local dynasties. They did however retain their ceremonial religious function as Caliphs until replaced by the Ottoman Sultan in 1517 CE.