The Fatimid Caliphate (Arabic: الفاطميون, al-Fāṭimīyūn) (909-1171) was a Shia Islamic caliphate that spanned a large area of North Africa, from the Red Sea in the east to the Atlantic Ocean in the west. The dynasty ruled across the Mediterranean coast of Africa and ultimately made Egypt the centre of the caliphate. At its height the caliphate included in addition to Egypt varying areas of the Maghreb, Sudan, Sicily, the Levant, and Hijaz.The Fatimids claimed descent from Fatima bint Muhammad (فاطمة بنت محمد), the daughter of Islamic prophet Muhammad. The Fatimids conquered North Africa and their Fatimid state took shape among the Kutama, in the West of the North African littoral, particularly Algeria, in 909 conquering Raqqada, the Aghlabid capital. In 921 the Fatimids established the Tunisian city of Mahdia as their new capital. In 948 they shifted their capital to Al-Mansuriya, near Kairouan in Tunisia. In 969 they conquered Egypt and established Cairo as the capital of their caliphate - Egypt became the political, cultural, and religious centre of their empire.The ruling class belonged to the Ismaili branch of Shi'ism, as did the leaders of the dynasty. The existence of the caliphate marked the only time the descendants of Ali through Fatimah (the daughter of the prophet) were united to any degree (except for the final period of the Rashidun Caliphate under Ali himself from 656 to 661) and the name ""Fatimid"" refers to Fatimah. The different term Fatimite is sometimes used to refer to the caliphate's subjects.After the initial conquests, the caliphate often allowed a degree of religious tolerance towards non-Ismaili sects of Islam, as well as to Jews, Maltese Christians, and Egyptian Coptic Christians. The Fatimid caliphate was also distinguished by the central role of Berbers in its initial establishment and in helping its development, especially on the military and political levels.During the late eleventh and twelfth centuries the Fatimid caliphate declined rapidly, and in 1171 Ṣalāḥ ad-Dīn invaded their territory. He founded the Ayyubid dynasty and incorporated the Fatimid state into the Abbasid Caliphate.