The Fatimid Caliphate or al-Fātimiyyūn (Arabic الفاطميون) was an Arab Shia Muslim caliphate first centered in Tunisia and later in Egypt that ruled over varying areas of the Maghreb, Sicily, Malta, the Levant, and Hijaz from 5 January 909 onwards until 1230. The caliphate was ruled by the Fatimids, who established the Tunisian city of Mahdia and made it their capital city, before conquering the Egyptian city of Cairo in 969, which thereafter became their capital.
The Fatimids had their origins among the Kutama Berbers of eastern Algeria (modern Jijel Province). The dynasty was founded in 909 by ʻAbdullāh al-Mahdī Billah, who in the late 9th century started a movement among the Kutama and managed to convert them to Shia Islam. Ubayd Allah legitimised his claim through his supposed descent from Muhammad by way of his daughter Fātima as-Zahra and her husband ʻAlī ibn-Abī-Tālib, the first Shīʻa Imām, hence the name al-Fātimiyyūn "Fatimid". For the first half of its existence the empire's power rested primarily on the Kutama Berbers and their strength, with a Berber army conquering northern Africa, Palestine, Syria and, for a short time, Baghdad. Their role within the Fatimid state was so central that Ibn Khaldun counted the Fatimids among the Berber dynasties. Abdullāh al-Mahdi's control soon extended over all of central Maghreb, an area consisting of the modern countries of Morocco, Algeria, Tunisia, and Libya, which he ruled from Mahdia, his newly built capital in Tunisia.
The Fatimids entered Egypt in the late 10th century, conquering the Ikhshidid dynasty, and founding a new capital at al-Qāhira (Cairo) in 969. The name was a reference to the planet Mars, "The Subduer", which was prominent in the sky at the moment that city construction started. Cairo was intended as a royal enclosure for the Fatimid caliph and his army, though the actual administrative and economic capital of Egypt was in cities such as Fustat until 1169. After Egypt, the Fatimids continued to conquer the surrounding areas until they ruled from Tunisia to Syria, and even ruling Sicily, and southern parts of the Italian Peninsula. Under the Fatimids, Egypt became the center of an empire that included at its peak North Africa, Sicily, Palestine, Lebanon, Syria, the Red Sea coast of Africa, Hejaz, and Yemen. Egypt flourished, and the Fatimids developed an extensive trade network in both the Mediterranean and the Indian Ocean. Their trade and diplomatic ties extended all the way to China and its Song Dynasty, which eventually determined the economic course of Egypt during the High Middle Ages.
In the 1040s, the Zirids (governors of North Africa under the Fatimids) declared their independence from the Fatimids and their recognition of the Sunni Abbasid caliphs of Baghdad, which led the Fatimids to launch devastating Banū Hilal invasions. After about 1070, the Fatimid hold on the Levant coast and parts of Syria was challenged first by Turkic invasions, then the Byzantine Empire, so that Fatimid territory shrank until it consisted only of Egypt.
After the decay of the Fatimid political system in the 1160s, the Zengid ruler Nūr ad-Dīn had his general Shirkuh attack Egypt to claim it from the vizier Shawar in 1169. The invasion failed and the Fatmids were able to repulse it, ensuring the state would survive.
Rising from the Ashes
During the 1000's, the Byzantine Empire under the Comnenus dynasty began to rise to become a pre-eminent power in the Eastern Mediterranean again. By the late eleventh century, they were trade rivals of the Fatmids. A new caliph arose, one who called himself 'Mohammed II'. He declared he was the savior of the Fatmid dynasty. Although his relation claims to the Fatmid rulers was disputed, the people accepted him as a powerful ruler.
Mohammed II proved an excellent administrator, but was ruler over a dying nation. The Fatmids had already lost most of Northwestern Africa to the Almoravids, and had lost Sicily and Malta altogether to the Normans. All that remained of their once-formidable empire included Egypt, parts of Libya, and southern Judea. Mohammed II subsequently led a Jihad, or holy war, against the minor Sunni states which had been established over Palestine. By 1096, the Fatmids had raised an army in Egypt and crushed the last of the Sunni states, restoring Palestine to the caliphate. The Egyptians hailed this as a sign from God that Mohammed II was their appointed ruler, and believed his claims to be Mohammed's relation.
The same year, Pope Urban II preached the need for Crusades to the Holy Land, calling upon the kings and noblemen of Western European Christian nations to free the Holy Land from Muslim rulers. Fortunately for the Fatmids, the Crusades were directed against the Seljuk Turks in Syria and ended in failure. In 1056, Alexios I of Byzantium had risen to the throne. Finding Byzantine expansion checked by the Normans in the west, the Turks in the east, and growing Fatmids in the south, he turned north to the conquest of Russia instead. By 1126, Moscow and Kiev had both been overrun by a Byzantine expeditionary force. The Greeks' main advantage was their ability to move swiftly over winter wastelands and use local militia troops, guides, and mercenaries for their conquest.
Mohammed II had died in 1103, just after signing a profitable alliance with the Almoravids. He was succeeded by his eldest son, al-Talib. al-Talib recognized the Byzantine Empire's growing strength. Having concluded a successful peace treaty with the Turks, the new caliph hoped to do the same with the Greeks and establish an alliance. By 1126, however, he had exhausted his diplomatic skills and was turned down bitterly. The Byzantines had their heart set on eventually expelling the Muslims from the Holy Land, and refused to discuss an official peace. al-Talib died in 1127, having lived to a ripe old age. On his deathbed, he is supposed to have predicted a new age for the Fatmids, for better or for worse.
In 1129, the Byzantines crushed a Turkish army in Anatolia and shattered the Seljuk sultanate. By 1134, the Byzantine forces had killed the Turkish sultan, and annexed nearly all of northern Syria. Meanwhile, the Byzantine ruler Alexios II had his eye on the Fatmid Caliphate and was continually wary of them. After surviving two attempted assassination attempts orchestrated by the Fatmids, the emperor ordered an invasion of Syria. Several especially bloody battles were fought in the Syrian desert, which the Byzantines only won with agonizing difficulty. The Greeks also hired Egyptian and Moorish mercenaries to help them better combat the Fatmid forces. By 1140, Antioch itself was in their hands. The Fatmid Caliphate called a Jihad against the Byzantine Empire, but Alexios had wisely developed an alliance with the faraway Almoravids, who retracted the alliance but refused to join the Fatmids in the Jihad.
As many as 50,000 Byzantine troops were amassed on the borders of southern Syria to prevent the Jihad, but the Fatmids continually tried to attack isolated Greek positions in the Syrian desert instead. After four years of scattered fighting and skirmishes, the Fatmid forces withdrew back to Palestine, leaving Syria firmly in Byzantine hands. Alexios II ended his reign with a forced white peace on the Fatmid Caliphate.
The Fatmid Caliphate finally went into a state of decline after the last of al-Talib's descendants died without an heir in 1230. The caliphate was swiftly torn apart by six years of brutal civil war, which ended when the named official caliph was killed by his own Mamluk bodyguards. The Fatmids were at an end. Following the civil war, the Mamluks went on to establish their own sultanate on the ruins of the caliphate, which survived through the rest of the Middle Ages.