The family came to power in the Abbasid Revolution in 748–750, supplanting the Umayyad Caliphate. They were the rulers of the Abbasid Caliphate, as well as the generally recognized ecumenical heads of Islam, until the 10th century, when the Shi'a Fatimid Caliphate (established in 909) and the Caliphate of Córdoba (established in 929) challenged their primacy. The political decline of the Abbasids had begun earlier, during the Anarchy at Samarra (861–870), which accelerated the fragmentation of the Muslim world into autonomous dynasties. The caliphs lost their temporal power in 936–946, first to a series of military strongmen, and then to the Shi'a Buyid Emirs that seized control of Baghdad; the Buyids were in turn replaced by the Sunni Seljuk Turks in the mid-11th century, and Turkish rulers assumed the title of "Sultan" to denote their temporal authority. The Abbasid caliphs remained the generally recognized suzerains of Sunni Islam, however. In the mid-12th century, the Abbasids regained their independence from the Seljuks, but the revival of Abbasid power ended with the Sack of Baghdad by the Mongols in 1258.
