Formerly, the central ruling office of Islam. The first caliph (Arabic, khalifa, “deputy of God” or “successor of his Prophet”) after the Prophet Muhammad's death in 632 was his father-in-law Abu Bakr; he was followed by Umar ibn al-Khattab, Uthman, and Ali: these four are called the Rashidun (rightly guided) caliphs. When Ali died in 661 Shiite Muslims recognized his successors, the imams, as rightful possessors of the Prophet's authority, the rest of Islam accepting the Umayyad dynasty. They were overthrown in 750 by the Abbasids, but within two centuries they were virtually puppet rulers under Turkish control. Meanwhile an Umayyad refugee had established an independent emirate in Spain in 756, which survived for 250 years, and in North Africa a Shiite caliphate arose under the Fatimids, the imams of the Ismailis (909–1171). After the Mongols sacked Baghdad in 1258 the caliphate, now only a name, passed to the Mameluke rulers of Egypt and from the Ottoman conquest of Egypt in 1517 the title was assumed by the Turkish sultans, until its abolition in 1924.