Origins The Fatimid dynasty came to power as the leaders of
Isma'ilism, a revolutionary
Shi'a movement "which was at the same time political and religious, philosophical and social," and which originally proclaimed nothing less than the arrival of an Islamic
messiah. The origins of that movement, and of the dynasty itself, are obscure prior to the late ninth century. The
Fatimid rulers were Arab in origin, starting with its founder, the
Isma'ili Shi'a caliph
Abdallah al-Mahdi Billah. The caliphate's establishment was accomplished by
Kutama Berbers from
Little Kabylia, who converted to the Fatimid cause early and made up its original military forces. In 893 the Abu Abdallah al-Shi'i first settled among the Banu Saktan tribe (part of the larger Kutama tribe) in
Ikjan, near the city of
Mila (in northeastern Algeria today). However, due to hostility from the local Aghlabid authorities and other Kutuma tribes, he was forced to leave Ikjan and sought the protection of another Kutama tribe, the Banu Ghashman, in Tazrut (two miles southwest of Mila). From there, he began to build support for a new movement. Shortly after, the hostile Kutama tribes and the Arab lords of the nearby cities (Mila,
Setif, and
Bilizma) allied together to march against him, but he was able to move quickly and muster enough support from friendly Kutama to defeat them one by one before they were able to unite. This first victory brought Abu Abdallah and his Kutama troops valuable loot and attracted more support to the 's cause. Over the next two years Abu Abdallah was able to win over most of the Kutama tribes in the region through either persuasion or coercion. This left much of the countryside under his control, while the major cities remained under Aghlabid control. He established an Isma'ili theocratic state based in Tazrut, operating in a way similar to previous Isma'ili missionary networks in Mesopotamia but adapted to local Kutama tribal structures. He adopted the role of a traditional Islamic ruler at the head of this organization while remaining in frequent contact with Abdallah. He continued to preach to his followers, known as the ''Awliya' Allah'' ('Friends of God'), and to initiate them into Isma'ili doctrine.
Conquest of Aghlabid Ifriqiya In 902, while the Aghlabid emir
Ibrahim II was away on campaign in
Sicily, Abu Abdallah struck the first significant blow against Aghlabid authority in
North Africa by attacking and capturing the city of Mila for the first time. This news triggered a serious response from the Aghlabids, who sent a punitive expedition of 12,000 men from Tunis in October of the same year. Abu Abdallah's forces were unable to resist this counterattack and after two defeats they evacuated Tazrut (which was largely unfortified) and fled to Ikjan, leaving Mila to be retaken. Ikjan became the new centre of the Fatimid movement and the reestablished his network of missionaries and spies. Ibrahim II died in October 902 while in
southern Italy and was succeeded by
Abdallah II. In early 903 Abdallah II set out on another expedition to destroy Ikjan and the Kutama rebels, but he ended the expedition prematurely due to troubles at home arising from disputes over his succession. On 27 July 903, he was assassinated and his son
Ziyadat Allah III took power in Tunis. These internal Aghlabid troubles gave Abu Abdallah the opportunity to recapture Mila and then go on to capture Setif, another fortified city, by October or November 904. In 905 the Aghlabids sent a third expedition to try and subdue the Kutama. They based themselves in
Constantine and in the fall of 905, after receiving further reinforcements, set out to march against Abu Abdallah. However, they were surprised by Kutama forces on the first day of their march, which caused a panic and scattered their army. The Aghlabid general fled and the Kutama captured a large booty. Another Aghlabid military expedition organized the next year (906) failed when the soldiers mutinied. Around the same time or soon after, Abu Abdallah's forces besieged and captured the fortified cities of
Tubna and Bilizma. The capture of Tubna was significant as it was the first major commercial centre to come under Abu Abdallah's control. Meanwhile, Ziyadat Allah III moved his court from Tunis to
Raqqada, the palace-city near
Kairouan, in response to the growing threat. He fortified Raqqada in 907. In early 907 another Aghlabid army marched westwards again against Abu Abdallah, accompanied by Berber reinforcements from the
Aurès Mountains. They were again scattered by Kutama cavalry and retreated to
Baghaya, the most fortified town on the old southern Roman road between Ifriqiya and the central Maghreb. The fortress, however, fell to the Kutama without a siege when local notables arranged to have the gates opened to them in May or June 907. This opened a hole in the wider defensive system of Ifriqiya and created panic in Raqqada. Ziyadat Allah III stepped up anti-Fatimid propaganda, recruited volunteers, and took measures to defend the weakly fortified city of Kairouan. He spent the winter of 907–908 with his army in
al-Aribus (
Roman-era Laribus, between present-day
El Kef and
Maktar), expecting an attack from the north. However, Abu Abdallah's forces had been unable to capture the northerly city of Constantine and therefore they instead attacked along the southern road from Baghaya in early 908 and captured
Maydara (present-day Haïdra). An indecisive battle subsequently occurred between the Aghalabid and Kutama armies near Dar Madyan (probably a site between
Sbeitla and
Kasserine), with neither side gaining the upper hand. During the winter of 908–909 Abu Abdallah campaigned in the region around
Chott el-Jerid, capturing the towns of
Tuzur (Tozeur),
Nafta, and
Qafsa (Gafsa) and taking control of the region. The Aghlabids responded by besieging Baghaya soon afterward in the same winter, but they were quickly repelled. On 25 February 909, Abu Abdallah set out from Ikjan with an army of 200,000 men for a final invasion of Kairouan. The remaining Aghlabid army, led by an Aghlabid prince named Ibrahim Ibn Abi al-Aghlab, met them near al-Aribus on 18 March. The battle lasted until the afternoon, when a contingent of Kutama horsemen managed to outflank the Aghlabid army and finally caused a rout. When news of the defeat reached Raqqada, Ziyadat Allah III packed his valuable treasures and fled towards Egypt. The population of Kairouan looted the abandoned palaces of Raqqada and resisted Ibn Abi al-Aghlab's calls to organise a last-ditch resistance. Upon hearing of the looting, Abu Abdallah sent an advance force of Kutama horsemen who secured Raqqada on 24 March. On 25 March 909 (Saturday, 1
Rajab 296), Abu Abdallah himself entered Raqqada and took up residence here.
Establishment of the Caliphate Upon assuming power in Raqqada, Abu Abdallah inherited much of the Aghlabid state's apparatus and allowed its former officials to continue working for the new regime. He established a new, Isma'ili Shi'a regime on behalf of his absent, and for the moment unnamed, master. He then led his army west to Sijilmasa, whence he led Abdallah in triumph to Raqqada, which he entered on 15 January 910. There Abdallah publicly proclaimed himself as
caliph with the
regnal name of , and presented his son and heir, with the regnal name of
al-Qa'im. Al-Mahdi quickly fell out with Abu Abdallah: not only was the over-powerful, but he demanded proof that the new caliph was the true . The elimination of Abu Abdallah al-Shi'i and his brother led to an uprising among the Kutama, led by a child-, which was suppressed. At the same time, al-Mahdi repudiated the millenarian hopes of his followers and curtailed their
antinomian tendencies. The new regime regarded its presence in Ifriqiya as only temporary: the real target was
Baghdad, the capital of the Fatimids' Abbasid rivals. The ambition to carry the revolution eastward had to be postponed after the failure of two successive invasions of Egypt, led by al-Qa'im, in
914–915 and
919–921. In addition, the Fatimid regime was as yet unstable. The local population were mostly adherents of
Maliki Sunnism and various
Kharijite sects such as
Ibadism, so that the real power base of Fatimids in Ifriqiya was quite narrow, resting on the Kutama soldiery, later extended by the
Sanhaja Berber tribes as well. The historian
Heinz Halm describes the early Fatimid state as being, in essence, "a hegemony of the Kutama and Sanhaja Berbers over the eastern and central Maghrib". pavement from the palace of
al-Qa'im in
al-Mahdiyya (Mahdia), on display at the
Mahdia Museum In 912, al-Mahdi began looking for the site of a new capital along the Mediterranean shore. However, some Christian or Byzantine resistance continued in some spots in the northeast of Sicily until 967, and the Byzantines still held territories in southern Italy, where the Aghlabids had also campaigned. As a result of the political instability in the western Maghreb, effective Fatimid control did not extend much beyond the former territory of the Aghlabids. Masala's successor,
Musa ibn Abi'l-Afiya, captured Fez from the Idrisids again, but in 932 defected to the Umayyads, taking the western Maghreb with him. The Umayyads gained the upper hand again in northern Morocco during the 950s, until the Fatimid general
Jawhar, on behalf of Caliph
Al-Mu'izz li-Din Allah, led another major
expedition to Morocco in 958 and spent two years subjugating most of northern Morocco. He was accompanied by
Ziri ibn Manad, the leader of the
Zirids. Jawhar took Sijilmasa in September or October 958 and then, with the help of Ziri, his forces took Fez in November 959. He was unable, however, to dislodge the Umayyad garrisons in
Sala,
Sebta (present-day Ceuta) and
Tangier, and this marked the only time that the Fatimid army was present at the
Strait of Gibraltar. Jawhar and Ziri returned to al-Mansuriyya in 960. The subjugated parts of Morocco, including Fez and Sijilmasa, were left under the control of local vassals while most of the central Maghreb (Algeria), including Tahert, was given to Ziri ibn Manad to govern on the caliph's behalf. All this warfare in the Maghreb and Sicily necessitated the maintenance of a strong army, and a
capable fleet as well. Nevertheless, by the time of al-Mahdi's death in 934, the Fatimid Caliphate "had become a great power in the Mediterranean". The reign of the second Fatimid imam-caliph, al-Qa'im, was dominated by the Kharijite rebellion of
Abu Yazid. Starting in 943/4 among the
Zenata Berbers, the uprising spread through Ifriqiya, taking Kairouan and blockading al-Qa'im at al-Mahdiyya, which was besieged in January–September 945. Al-Qa'im died during the siege, but this was kept secret by his son and successor, Isma'il, until he had defeated Abu Yazid; he then announced his father's death and proclaimed himself imam and caliph as
al-Mansur. While al-Mansur was campaigning to suppress the last remnants of the revolt, a new palace city was being constructed for him south of Kairouan. Construction began around 946 and it was only fully completed under al-Mansur's son and successor, al-Mu'izz. It was named
al-Mansuriyya (also known as Sabra al-Mansuriyya) and became the new seat of the caliphate. The name
al-Qahira, meaning "the Vanquisher" or "the Conqueror", referenced the planet
Mars, "The Subduer", rising in the sky at the time when the construction of the city started. The city was located several miles northeast of
Fustat, the older regional capital founded by the
Arab conquerors in the seventh century. Control of Egypt was secured with relative ease and soon afterward, in 970, Jawhar sent a force to invade Syria and remove the remaining Ikhshidids who had fled there from Egypt. This Fatimid force was led by a Kutama general named
Ja'far ibn Falah. This invasion was successful at first and many cities, including Damascus, were occupied that same year. Ja'far's next step was to attack the Byzantines, who had captured
Antioch and subjugated
Aleppo in 969 (around the same time as Jawhar was arriving in Egypt), but he was forced to call off the advance in order to face a new threat from the east. The Qarmatis of Bahrayn, responding to the appeal of the recently defeated leaders of Damascus, had organized a large coalition of Arab tribesmen to attack him. Ja'far chose to confront them in the desert in August 971, but his army was surrounded and defeated and Ja'far himself was killed. A month later the Qarmati imam Hasan al-A'ṣam led the army, with new reinforcements from
Transjordan, into Egypt, seemingly without opposition. The Qarmatis spent time occupying the Nile Delta region, which gave Jawhar time to organize a defence of Fustat and Cairo. The Qarmati advance was halted just north of the city and eventually routed. A
Kalbid relief force arriving by sea secured the expulsion of the Qarmatis from Egypt.
Ramla, the capital of
Palestine, was retaken by the Fatimids in May 972, but otherwise the progress in Syria had been lost. , 11th century CE (pre-1168 CE). Museum of Islamic Art, Cairo, 12880. Once Egypt was sufficiently
pacified and the new capital was ready, Jawhar sent for al-Mu'izz in Ifriqiya. The caliph, his court, and his treasury, departed from al-Mansuriyya in fall 972, travelling by land but shadowed by the Fatimid navy sailing along the coast. After making triumphant stops in major cities along the way, the caliph arrived in Cairo on 10 June 973. Like other royal capitals before it, Cairo was constructed as an administrative and palatine city, housing the
palaces of the caliph and the official state mosque,
Al-Azhar Mosque. In 988, the mosque also became an academic institution that was central in the dissemination of Isma'ili teachings. Until the last years of the Fatimid Caliphate, the economic centre of Egypt remained Fustat, where most of the general population lived and traded. Under the Fatimids, Egypt became the centre of an empire that included at its peak parts of North Africa, Sicily, the
Levant (including Transjordan), the
Red Sea coast of Africa,
Tihamah,
Hejaz,
Yemen, with its most remote territorial reach being
Multan (in modern-day Pakistan). Egypt flourished, and the Fatimids developed an extensive trade network both in the Mediterranean and in the Indian Ocean. Their trade and diplomatic ties, extending all the way to China under the
Song Dynasty (), eventually determined the economic course of Egypt during the
High Middle Ages. The Fatimid focus on agriculture further increased their riches and allowed the dynasty and the Egyptians to flourish. The use of cash crops and the propagation of the
flax trade allowed Fatimids to import other items from various parts of the world. The Fatimids built upon some of the bureaucratic foundations laid by the Ikhshidids and the old Abbasid imperial order. The office of the
wazir (
vizier), which existed under the Ikhshidids, was soon revived under the Fatimids. The first to be appointed to this position was the
Jewish convert
Ya'qub ibn Killis, who was elevated to this office in 979 by al-Mu'izz's successor
al-Aziz. The office of the vizier became progressively more important over the years, as the vizier became the intermediary between the caliph and the large bureaucratic state that he ruled.
Campaigns in Syria near
Cairo. Museum of Islamic Art, Cairo, inv. no. 13703. Attribution to the Fatimid period is sometimes questioned. In 975, the Byzantine emperor
John Tzimisces retook most of Palestine and Syria, leaving only
Tripoli in Fatimid control. He aimed to capture
Jerusalem, but he died in 976 on his way back to
Constantinople, thus staving off the Byzantine threat to the Fatimids. Meanwhile, the
Turkish ghulam (plural:
ghilman, meaning soldiers recruited as slaves)
Aftakin, a
Buyid refugee who had fled an unsuccessful rebellion in Baghdad with his own contingent of Turkish soldiers, became the protector of Damascus. He allied with the Qarmatis and with Arab
Bedouin tribes in Syria and invaded Palestine in the spring of 977. Jawhar, once again called into action, repelled their invasion and besieged Damascus. However, he suffered a rout during the winter and was forced to hold out in
Ascalon against Aftakin. When his Kutama soldiers mutinied in April 978, Caliph al-Aziz himself led an army to relieve him. Instead of returning to Damascus, Aftakin and his Turkish
ghilman joined the Fatimid army and became a useful instrument in the Syrian effort. After Ibn Killis became vizier in 979, the Fatimids changed tactics. Ibn Killis was able to subjugate most of Palestine and southern Syria (the former Ikhshidid territories) by paying off the Qarmatis with an annual tribute and making alliances with local tribes and dynasties, such as the
Jarrahids and the
Banu Kilab. Following another failed attempt by a Kutama general, Salman, to take Damascus, the Turkish
ghulam Bultakin finally succeeded in occupying the city for the Fatimids in 983, demonstrating the value of this new force. Another
ghulam, Bajkur, was appointed governor of Damascus at this time. That same year he tried and failed to take Aleppo, but he was soon able to conquer
Raqqa and
Rahba in the
Euphrates valley (present-day northeast
Syria). Cairo eventually judged him to be a little too popular as governor of Damascus and he was forced to move to Raqqa while Munir, a eunuch in the caliph's household (like Jawhar before him), took direct control in Damascus on behalf of the caliph. Further north, Aleppo remained out of reach and under
Hamdanid control. The incorporation of the Turkish troops into the Fatimid army had long-term consequences. On the one hand, they were a necessary addition to the military in order for the Fatimids to compete militarily with other powers in the region. The Fatimids began to recruit
ghilman much as the Abbasids had done before them. They were soon joined by recruited
Daylamis (footmen from the Buyid homeland in
Iran).
Black Africans from the
Sudan (upper Nile valley) were also recruited afterward. In the short term the Kutama warriors remained the most important troops of the Caliph, but resentment and rivalry eventually grew between the different ethnic components of the army. Bajkur, based in Raqqa, made another unsuccessful attempt against Aleppo in 991 which resulted in his capture and execution. That same year, Ibn Killis died and Munir was accused of conducting treasonous correspondence with Baghdad. These difficulties triggered a strong response in Cairo. A major military campaign was prepared to impose Fatimid control over all of Syria. Along the way, Munir was arrested in Damascus and sent back to Cairo. Circumstances were favourable to the Fatimids as the Byzantine emperor
Basil II was campaigning far away in the
Balkans and the Hamdanid ruler
Sa'd al-Dawla died in late 991. Manjutakin, the Turkish Fatimid commander, advanced methodically north along the Orontes valley. He took Homs and Hama in 992 and defeated a combined force from Hamdanid Aleppo and Byzantine-held Antioch. In 993 he took Shayzar and in 994 he began the siege of Aleppo. In May 995, however, Basil II unexpectedly arrived in the region after a
forced march with his army through Anatolia, forcing Manjutakin to lift the siege and return to Damascus. Before another Fatimid expedition could be sent, Basil II negotiated a one-year truce with the caliph, which the Fatimids used to recruit and build new ships for their fleet. In 996 many of the ships were destroyed by a fire at al-Maqs, the port on the Nile near Fustat, further delaying the expedition. Finally, in August 996 al-Aziz died and the objective of Aleppo became secondary to other concerns.
The Zirids in the Maghreb Before leaving for Egypt, al-Mu'izz had installed
Buluggin ibn Ziri, the son of Ziri bn Manad (who died in 971), as his viceroy in the Maghreb. This established a dynasty of viceroys, with the title of "amir", who ruled the region on behalf of the Fatimids. Their authority remained disputed in the western Maghreb, where the rivalry with the Umayyads and with local Zenata leaders continued. After Jawhar's successful western expedition, the Umayyads returned to northern Morocco in 973 to reassert their authority. Buluggin launched one last
expedition in 979–980 that reestablished his authority in the region temporarily, until a final decisive Umayyad intervention in 984–985 put an end to further efforts. Among other things, al-Hakim was known for executing his officials when unsatisfied with them, seemingly without warning, rather than dismissing them from their posts as had been traditional practice. Many of the executions were members of the financial administration, which may mean that this was al-Hakim's way of trying to impose discipline in an institution rife with corruption. He also opened the ''Dar al-'Ilm'' ("House of Knowledge"), a library for the study of the sciences, which was in line with al-Aziz's previous policy of cultivating this knowledge. For the general population, he was noted for being more accessible and willing to receive petitions in person, as well as for riding out in person among the people in the streets of Fustat. On the other hand, he was also known for his capricious decrees aimed at curbing what he saw as public improprieties. He also unsettled the plurality of Egyptian society by imposing new restrictions on Christians and Jews, particularly on the way they dressed or behaved in public. He ordered or sanctioned the destruction of a number of churches and monasteries (mostly
Coptic or
Melkite), which was unprecedented, and in 1009, for reasons that remain unclear, he ordered the demolition of the
Church of the Holy Sephulchre in Jerusalem. Al-Hakim greatly expanded the recruitment of Black Africans into the army, who subsequently became another powerful faction to balance against the Kutama, Turks, and Daylamis. In 1005, during his early reign, a dangerous uprising led by
Abu Rakwa was successfully put down but had come within striking distance of Cairo. In 1012 the leaders of the Arab
Tayyi tribe occupied Ramla and proclaimed the
sharif of
Mecca,
al-Hasan ibn Ja'far, as the Sunni anti-caliph, but the latter's death in 1013 led to their surrender. Despite his policies against Christians and his demolition of the church in Jerusalem, al-Hakim maintained a ten-year truce with the Byzantines that began in 1001. For most of his reign, Aleppo remained a buffer state that paid tribute to Constantinople. This lasted until 1017, when the Fatimid
Armenian general
Fatāk finally occupied Aleppo at the invitation of a
local commander who had expelled the Hamdanid
ghulam ruler
Mansur ibn Lu'lu'. After a year or two, however, Fatak made himself effectively independent in Aleppo. in Cairo, commissioned by
al-Aziz in 990 and completed by
al-Hakim in 1013 (later renovated in the 1980s by the
Dawoodi Bohra) Al-Hakim also alarmed his Isma'ili followers in several ways. In 1013 he announced the designation of two great-great-grandsons of al-Mahdi as two separate heirs: one, Abd al-Rahim ibn Ilyas, would inherit the title of caliphate as the role of political ruler, and the other, Abbas ibn Shu'ayb, would inherit the imamate or religious leadership. This was a serious departure from a central purpose of the Fatimid Imam-Caliphs, which was to combine these two functions in one person. In 1015 he also suddenly halted the Isma'ili doctrinal lectures of the
majalis al-hikma ("sessions of wisdom") which had taken place regularly inside the palace. In 1021, while wandering the desert outside Cairo on one of his nightly excursions, he disappeared. He was purportedly murdered, but his body was never found.
Decline Losses, successes, and civil war After al-Hakim's death his two designated heirs were killed, putting an end to his succession scheme, and his sister
Sitt al-Mulk arranged to have his 15-year-old son Ali installed on the throne as
al-Zahir. She served as his regent until her death in 1023, at which point an alliance of courtiers and officials ruled, with
al-Jarjara'i, a former finance official, at their head. Fatimid control in Syria was threatened during the 1020s. In Aleppo, Fatak, who had declared his independence, was killed and replaced in 1022, but this opened the way for a coalition of Bedouin chiefs from the Banu Kilab, Jarrahids, and
Banu Kalb led by
Salih ibn Mirdas to take the city in 1024 or 1025 and to begin imposing their control on the rest of Syria. Al-Jarjara'i sent
Anushtakin al-Dizbari, a Turkish commander, with a force that defeated them in 1029 at the
Battle of Uqhuwana near Lake Tiberias. In 1030 the new Byzantine emperor
Romanos III broke a truce to
invade northern Syria and forced Aleppo to recognize his suzerainty. His death in 1034 changed the situation again and in 1036 peace was restored. In 1038 Aleppo was directly annexed by the Fatimids state for the first time. minted during the reign of
al-Mustansir Billah (1036–1094) Al-Zahir died in 1036 and was succeeded by his son,
al-Mustansir, who had the longest reign in Fatimid history, serving as caliph from 1036 to 1094. However, he remained largely uninvolved in politics and left the government in the hands of others. He was seven years old at his accession and thus al-Jarjara'i continued to serve as vizier and his guardian. When al-Jarjara'i died in 1045 a series of court figures ran the government until
al-Yazuri, a
jurist of Palestinian origin, took and kept the office of vizier from 1050 to 1058. In the 1040s (possibly in 1041 or 1044), the Zirids declared their independence from the Fatimids and recognized the Sunni Abbasid caliphs of Baghdad, which led the Fatimids to launch the devastating
Banu Hilal invasions of North Africa. There was more success in the east, however. In 1047, the Fatimid ''da'i''
Ali Muhammad al-Sulayhi in Yemen built a fortress and recruited tribes with which he was able to capture
San'a in 1048. In 1060, he began a campaign to conquer all of Yemen, capturing
Aden and
Zabid. In 1062 he marched on Mecca, where
Shukr ibn Abi al-Futuh's death in 1061 provided an excuse. Along the way he forced the
Zaydi Imam in
Sa'da into submission. Upon arriving in Mecca, he installed
Abu Hashim Muhammad ibn Ja'far as the new sharif and custodian of the holy sites under the suzerainty of the Fatimids. He returned to San'a where he established his family as rulers on behalf of the Fatimid caliphs. His brother founded the city of
Ta'izz, while the city of Aden became an important hub of trade between Egypt and
India, which brought Egypt further wealth. His rise to power established the
Sulayhid dynasty which continued to rule Yemen as nominal vassals of the Fatimids after this. Events degenerated in Egypt and Syria, however. Starting in 1060, various local leaders began to break away or challenge Fatimid dominion in Syria. While the ethnic-based army was generally successful on the battlefield, it had begun to have negative effects on Fatimid internal politics. Traditionally, the Kutama element of the army had the strongest sway over political affairs, but as the Turkish element grew more powerful it began to challenge this. In 1062, the tentative balance between the different ethnic groups within the Fatimid army collapsed and they quarrelled constantly or fought each other in the streets. At the same time, Egypt suffered a seven-year period of drought and famine known as the
Mustansirite Hardship. Viziers came and went in a flurry, the bureaucracy broke down, and the caliph was unable or unwilling to assume responsibilities in their absence. Declining resources accelerated the problems among the different ethnic factions and outright civil war began, primarily between the Turks under
Nasir al-Dawla ibn Hamdan, a scion of the Hamdanids of Aleppo, and Black African troops, while the Berbers shifted alliance between the two sides. The Turkish faction under Nasir al-Dawla seized partial control of Cairo but their leader was not given any official title. In 1067–1068, they plundered the state treasury and then looted any treasures they could find in the palaces. The Turks turned against Nasir al-Dawla in 1069 but he managed to rally Bedouin tribes to his side, took over most of the Nile Delta region, and blocked supplies and food from reaching the capital from this region. Things degenerated further for the general population, especially in the capital, which relied on the countryside for food. Historical sources of this period report extreme hunger and hardship in the city, even to the point of
cannibalism. The depredations in the Nile Delta may have also been a turning point that accelerated the long-term decline of the Coptic community in Egypt.
Badr al-Jamali and the Fatimid revival , Cairo, overlooking the city from the
Muqattam Hills , one of the gates of Cairo dating from
Badr al-Jamali's reconstruction of the city walls (1987) By 1072, in a desperate attempt to save Egypt, al-Mustansir recalled general
Badr al-Jamali, who was at the time the governor of
Acre. Badr led his troops into Egypt, entered Cairo in January 1074, and successfully suppressed the different groups of the rebelling armies. As a result, Badr was made vizier, becoming one of the first military viziers (
amir al-juyush 'commander of the armies') who would dominate late Fatimid politics. In 1078 al-Mustansir formally abdicated responsibility for all state affairs to him. His
de facto rule initiated a temporary and limited revival of the Fatimid state, although it was now faced with serious challenges. Badr reestablished Fatimid authority in the
Hejaz (Mecca and
Medina) and the Sulayhids were able to hold on in Yemen. Syria, however, saw the advance of the Sunni-aligned
Seljuk Turks, who had conquered much of the Middle East and had become the guardians of the Abbasid Caliphs, as well as independent Turkmen groups.
Atsiz ibn Uwaq, a Turkmen of the Nawaki tribe, conquered Jerusalem in 1073 and Damascus in 1076 before attempting to invade even Egypt itself. After defeating him at a battle close to Cairo, Badr was able to start a counter-offensive to secure coastal cities, such as
Gaza and Ascalon, and later
Tyre,
Sidon, and
Byblos further north in 1089. Badr made major reforms to the state, updating and simplifying the administration of Egypt. As he was of Armenian background, his term also saw a large influx of Armenian immigrants, both Christian and Muslim, into Egypt. The
Armenian church, patronised by Badr, established itself in the country along with a clerical hierarchy. He commanded a large contingent of Armenian troops, many (if not all) of whom were also Christian. Badr also used his relations and influence with the Coptic Church for political advantage. In particular, he enlisted
Cyril II (
Coptic Pope from 1078 to 1092) to secure the allegiance of the Christian kingdoms of
Nubia (specifically
Makuria) and
Ethiopia (specifically the
Zagwe dynasty) as vassals to the Fatimid state. The
Juyushi Mosque ('the Mosque of the Armies'), was commissioned by Badr and completed in 1085 under the patronage of the caliph. The mosque, identified as a
mashhad, was also a victory monument commemorating vizier Badr's restoration of order for al-Mustansir. Between 1087 and 1092, the vizier also replaced the mudbrick walls of Cairo with new stone walls and slightly expanded the city. Three of its monumental gates still survive today:
Bab Zuweila,
Bab al-Futuh, and
Bab al-Nasr.
Final decline As the military viziers effectively became heads of state, the Caliph himself was reduced to the role of a figurehead. The reliance on the
iqta system also ate into Fatimid central authority, as more and more the military officers at the further ends of the empire became semi-independent. Badr al-Jamali died in 1094, along with Caliph al-Mustansir that same year, and his son
Al-Afdal Shahanshah succeeded him in power as vizier. After al-Mustansir, the Caliphate passed on to
al-Musta'li; after his death in 1101, it passed to the 5-year-old
al-Amir. Another of al-Mustansir's sons,
Nizar, attempted to take the throne after his father's death and organized a rebellion in 1095, but he was defeated and executed that same year. This resulted in a schism with Isma'ili missionaries in Iran, led by the ''da'i''
Hasan-i Sabbah, who founded the
Nizari sect and went on to form the
Order of Assassins. Al-Afdal arranged for his sister to marry al-Musta'li and later for his daughter to marry al-Amir, hoping in this way to merge his family with that of the caliphs. He also attempted to secure the succession of his son to the vizierate as well, but this ultimately failed. During al-Afdal's tenure (1094–1121), the Fatimids faced a new external threat: the
First Crusade. Although initially both sides intended to reach an agreement and an alliance against the Seljuk Turks, these negotiations would eventually break down. First contact seems to have been established by the crusaders who sent in May or June 1097, on suggestion of Byzantine Emperor
Alexios Komnenos, an embassy to al-Afdal. In return the Fatimids dispatched an embassy to the crusading forces which arrived in February 1098 during their
siege of Antioch, witnessing and congratulating the crusaders on their
victory against the Seljuk emirs
Ridwan of Aleppo and
Sökmen of Jerusalem as well as stressing their friendly attitude towards Christians. The Fatimid embassy stayed for a month with the crusading forces before returning via the harbour of
Latakia with gifts as well as Frankish ambassadors. It is uncertain whether an agreement was reached but it seems that the parties expected to reach a conclusion in Cairo. Al-Afdal took then advantage of the crusader
victory at Antioch to reconquer Jerusalem in August 1098, possibly to be in a better position in the negotiations with the crusaders. The next time both parties met was at
Arqah in April 1099 where an impasse was reached in regard to the question of ownership over Jerusalem. Following this, the crusaders crossed into Fatimid territory and
captured Jerusalem in July 1099 while al-Afdal was leading a relief army trying to reach the city. The two forces finally clashed in the
Battle of Ascalon in which al-Afdal was defeated. Nevertheless, the initial negotiations were held against the Fatimids and Ibn al-Athir wrote that it was said that the Fatimids had invited the crusaders to invade Syria. This defeat established the
Kingdom of Jerusalem as a new regional rival and although many crusaders returned to Europe, having fulfilled their vows, the remaining forces, often aided by the
Italian maritime republics, overran much of the coastal Levant, with
Tripoli,
Beirut, and Sidon falling to them between 1109 and 1110. The Fatimids retained Tyre, Ascalon, and Gaza with the help of their fleet. After 1107, a new rising star rose through the ranks of the regime in the form of Muhammad Ali bin Fatik, better known as
al-Ma'mun al-Bata'ihi. He managed to carry out various administrative reforms and infrastructural projects in the later years of al-Afdal's term, including the construction of an astronomical observatory in 1119. Al-Afdal was assassinated in 1121, an act blamed on the Nizaris or Assassins, though the truth of this is unconfirmed. built in 1125-6, under the
Caliph al-Amir Al-Bata'ihi took al-Afdal's place as vizier, but unlike his predecessors he had less support in the army and was ultimately reliant on the caliph for power. In 1124, he lost Tyre to the Crusaders. He was also responsible for constructing a small but notable mosque in Cairo, the
Al-Aqmar Mosque, which was completed in 1125 and has largely survived to the present day. That same year, however, Caliph al-Amir had him arrested, probably due to his failure to resist the Crusaders or due to the caliph's resentment of his wealth and power. Three years later he was executed. Al-Amir then ruled the Caliphate personally, briefly interrupting the long period of
de facto rule by the caliph's viziers. Al-Amir himself was assassinated in 1130, probably by the
Nizari Assassins. Al-Amir did not leave an adult heir but apparently had a son born shortly before his death, known as al-Ṭayyib. One of Al-Amir's cousins (a grandson of al-Mustansir), Abd al-Majid, had himself appointed regent. Under pressure from the army, one of al-Afdal's sons, Abu Ali Ahmad (known as Kutayfat), was appointed vizier with titles similar to al-Afdal and Badr al-Jamali. Kutayfat attempted to depose the Fatimid dynasty by imprisoning Abd al-Majid and by declaring himself to be the representative of
Muhammad al-Muntazar, the "hidden" Imam awaited by
Twelver Shi'as. The coup did not last long, as Kutayfat was assassinated in 1131 by al-Amir's followers in the Fatimid establishment. Abd al-Majid was released and resumed his role as regent. In 1132, however, he declared himself to be the new Imam-Caliph, taking the title of
al-Hafiz, sidelining the infant al-Ṭayyib and breaking with the tradition of the succession passing directly from father to son. Most of the Fatimid lands acknowledged his succession, but the Sulayhids in Yemen did not and broke away from the Caliphate in Cairo, recognizing al-Ṭayyib as the true Imam. This caused another schism between the
Hafizi and
Tayyibi branches of the
Musta'li Isma'ilis. In 1135, al-Hafiz was pressured by the Fatimid Armenian troops into appointing
Bahram, a Christian Armenian, to the office of vizier. Opposition from Muslim troops forced him to leave in 1137, when
Ridwan, a Sunni Muslim, was appointed vizier. When Ridwan began to plot the deposition of al-Hafiz, he was expelled from Cairo and later defeated in battle. He accepted a pardon from the caliph and remained at the palace. Al-Hafiz chose not to appoint another vizier, and instead took direct control of the state until his death in 1149. During this time, the fervour of the Isma'ili religious cause in Egypt had significantly faded, and political challenges to the caliph became more common. Sunni Muslims were also increasingly appointed to high posts. The Fatimid dynasty largely continued to survive due to the established common interests that many factions and elites had in maintaining the current system of government. in Cairo, built by
Tala'i ibn Ruzzik in 1160 and originally intended to house the head of
Husayn (the head ended up being interred instead at the present-day
al-Hussein Mosque) Al-Hafiz was the last Fatimid caliph to rule directly and the last one to ascend to the throne as an adult. The last three caliphs,
al-Zafir (r. 1149–1154),
al-Fa'iz (r. 1154–1160), and
al-Adid (r. 1160–1171), were all children when they came to the throne. Under al-Zafir, an elderly Berber named Ibn Masal was initially vizier, per the instructions left by Al-Hafiz. The army, however, supported a Sunni named Ibn Sallar instead, whose supporters managed to defeat and kill Ibn Masal in battle. After negotiating with the women of the palace, Ibn Sallar was installed as vizier in 1150. In January 1153, the Crusader king
Baldwin III of
Jerusalem besieged Ascalon, the last remaining Fatimid foothold in the Levant. In April, Ibn Sallar was murdered in a plot organized by Abbas, his stepson, and Abbas's son, Nasr. As no relieving force arrived, Ascalon surrendered in August, on the condition that the inhabitants could leave safely for Egypt. It was on this occasion that the head of
Husayn was allegedly brought from Ascalon to Cairo, where it was housed in what is now the
al-Hussein Mosque. The next year (1154), Nasr murdered al-Zafir, and Abbas, now vizier, declared his 5-year-old son Isa (al-Fa'iz) the new caliph. The women of the palace intervened, calling on
Tala'i ibn Ruzzik, a Muslim Armenian governor in
Upper Egypt, to help. Tala'i drove out Abbas and Nasr from Cairo and became vizier that same year. Afterwards he also conducted renewed operations against the Crusaders, but he could do little more than harass them by sea. Al-Fa'iz died in 1160 and Tala'i was assassinated in 1161 by
Sitt al-Qusur, a sister of al-Zafir. Tala'i's son, Ruzzik ibn Tala'i, held the office of vizier until 1163, when he was overthrown and killed by
Shawar, the governor of
Qus. As vizier, Shawar came into conflict with his rival, the Arab general
Dirgham. The internal disorder of the Caliphate attracted the attention and meddling of the Sunni
Zengid ruler
Nur ad-Din, who was now in control of Damascus and a large part of Syria, and of the King of Jerusalem,
Amalric I. The Crusaders had already forced Tala'i ibn Ruzzik to pay them a tribute in 1161 and had made an attempt to invade Egypt in 1162. When Shawar was driven out of Cairo by Dirgham in 1163, he sought refuge and help with Nur al-Din. Nur al-Din sent his general,
Asad al-Din Shirkuh, to seize Egypt and reinstall Shawar as vizier. He accomplished this task in the summer of 1164, when Dirgham was defeated and killed. Shawar's remaining years continued in chaos as he made shifting alliances with either the King of Jerusalem or with Nur al-Din, depending on circumstances. In 1167, the Crusaders pursued Shirkuh's forces into Upper Egypt. In 1168, Shawar, worried about the possible Crusader capture of Cairo, infamously set fire to Fustat in an attempt to deny the Crusaders a base from which to besiege the capital. After forcing the Crusaders to leave Egypt again, Shirkuh finally had Shawar murdered in 1169, with the agreement of Caliph al-Adid. Shirkuh himself was appointed as al-Adid's vizier, but he died unexpectedly two months later. The position passed to his nephew,
Salah ad-Din Yusuf ibn Ayyub (known in the West as Saladin). Salah ad-Din was openly pro-Sunni and suppressed the Shi'a call to prayer, ended the Isma'ili doctrinal lectures (the
majalis al-hikma), and installed Sunni
judges. He finally and officially deposed al-Adid, the last Fatimid caliph, in September 1171. This ended the Fatimid dynasty and began the
Ayyubid Sultanate of Egypt and Syria. ==Dynasty==