The Abbasid Caliphate was the third of the four greatest Islamiccaliphates of the Arab Empire. It overthrew the Umayyad caliphs from all but Al-Andalus. It was built by the descendant of Muhammad's youngest uncle, Abbas ibn Abd al-Muttalib. It was created in Harran in 750 of the Christian era and shifted its capital in AD 762 from Harran to Baghdad. It flourished for two centuries, surviving the Zanj Rebellion (869-883). Abbasid rule was ended in 1258, when Hulagu Khan, the Mongol conqueror, sacked Baghdad. But they continued to claim authority in religious matters from their base in Egypt.