Fatimid dynasty

The Fatimid dynasty (الفاطميون) was an Arab dynasty that ruled the Fatimid Caliphate, between 909 and 1171 CE. Claiming to be descended from Fatima and Ali and adhering to Isma'ili Shi'ism, they held the Isma'ili imamate and considered themselves the rightful leaders of the Muslim community. The line of Nizari Isma'ili imams, represented today by the Aga Khans, claims descent from a branch of the Fatimids. The Alavi Bohras, predominantly based in Vadodara, also claim descent from the Fatimids.

The Fatimid dynasty emerged as the leaders of the clandestine early Isma'ili missionary movement in the ninth century CE, ostensibly acting on behalf of a hidden imam, implied at the time to be Muhammad ibn Isma'il. The Isma'ili spread widely across the Islamic world, then ruled by the Abbasid Caliphate. In 899, the future first Fatimid caliph, Abdallah, proclaimed himself to be the expected imam, causing a rift in the Isma'ili as the Qarmatians, who did not recognize his imamate, split off. In the meantime, Isma'ili agents had managed to conquer large parts of Yemen and Ifriqiya, as well as launch uprisings in Syria and Iraq. Fleeing Abbasid persecution to Ifriqiya, Abdallah proclaimed himself openly and established the Fatimid Caliphate in 909. From there, the Fatimid imam–caliphs extended their rule over most of the Maghreb as well as Sicily, before conquering Egypt in 969. Founding Cairo as their new capital, for the next two centuries, the Fatimids would be based in Egypt and identified with the country. At their height, the Fatimids claimed control or suzerainty over much of North Africa, Sicily, Egypt, the Levant, the Hejaz, Yemen, and Multan.

The Fatimids' claimed pedigree of descent from Fatima and Ali was central to their legitimacy as the legitimate imams in an unbroken, divinely ordained line from Ali onwards. Their initial obscurity, and the publication of conflicting and incorrect genealogies by the first Fatimid caliph, Abdallah al-Mahdi Billah (known by the diminutive Ubayd Allah by his detractors), cast doubt on the accuracy of these claims, which were usually rejected by contemporary Sunni and Twelver Shi'a alike, who considered them impostors and usurpers. As a result, many sources into the 20th century referred to the Fatimids by the derogatory name Ubaydids.

Fatimid expansion into the Levant, and the ideological challenge that the ascendancy of Shi'a regimes represented, resulted in the Sunnis rallying around the Abbasid Caliphate in response, triggering the Sunni revival of the 11th century. Faced with internal turmoil, and the arrival of the Seljuk Turks and then the Crusades, Fatimid power began to decline in the later 11th century. the dynasty was saved by passing power to powerful military viziers, but this also meant that the imam–caliphs often were mere puppet rulers. The initial dynamism of the was diminished by bitter succession disputes, which resulted in large parts of the Isma'ili community, such as the Druze, Nizaris, and Tayyibis, breaking off from the Fatimid allegiance, and tarnished the prestige and authority of the dynasty. The last of the Fatimid imam–caliphs were powerless child rulers that were pawns in the hands of their viziers. The last of these viziers, Saladin, deposed the dynasty in 1171, after the death of Caliph al-Adid. The remaining members of the dynasty and their offspring were placed under house arrest in Cairo until their deaths; the last members of the dynasty died in the mid-13th century.

Background: early Shi'ism
Since the death of Caliph Ali ((r. 656 – 661)) in 661, which led to the establishment of the Umayyad Caliphate, a part of the Muslim community rejected the Umayyads as usurpers and called for the establishment of a regime led by a member of the, the family of Muhammad. The Abbasids, who claimed descent from Muhammad's paternal uncle Abbas ibn Abd al-Muttalib and thus claimed membership of the wider family, profited from this during their rise to power against the Umayyads; but their claim was rejected by the Shia, who insisted on the exclusive right of the descendants of Hasan and Husayn, Ali's sons by Muhammad's daughter Fatima. A line of imams emerged from the offspring of Husayn, who did not openly lay claim to the caliphate, but were considered by their followers as the true representatives of God on earth. This doctrine was founded on the designation (nass) of Ali by Muhammad at Ghadir Khumm, and later pro-Fatimid scholars held that an unbroken chain of designated imams would follow until the end of the world; indeed, these scholars argued that the imams' existence was an inevitable necessity.

The sixth of these imams, Ja'far al-Sadiq, appointed his son Isma'il al-Mubarak as his successor, but Isma'il died before his father, and when al-Sadiq himself died in 765, the succession was left open. One faction of al-Sadiq's followers held that he had designated another son, Musa al-Kazim, as his heir. Others followed other sons, Muhammad al-Dibaj and Abd Allah al-Aftah—as the latter died soon after, his followers went over to Musa's camp—or even refused to believe that al-Sadiq had died, and expected his return as a messiah. Musa's adherents, who constituted the majority of al-Sadiq's followers, followed his line down to a twelfth imam who supposedly vanished in 874. Adherents of this line are known as the Twelvers. Another branch believed that Ja'far al-Sadiq was followed by a seventh imam, who also had gone into hiding; hence this party is known as the Seveners. The exact identity of that seventh imam was disputed, but by the late ninth century had commonly been identified with Muhammad, son of Isma'il and grandson of al-Sadiq. From Muhammad's father, Isma'il, the sect receives its name of 'Isma'ili'. Neither Isma'il's nor Muhammad's lives are well known, and after Muhammad's reported death during the reign of Harun al-Rashid ((r. 786 – 809)), the history of the early Isma'ili movement becomes obscure.

Fatimid genealogies and controversies
Official Fatimid doctrine claimed an uninterrupted line of succession between the first Fatimid caliph, Abd Allah al-Mahdi Billah ((r. 909 – 934)), and Ali and Fatima, via Muhammad ibn Isma'il. This descent was both accepted and challenged already in the Middle Ages, and remains a topic of debate among scholars today. As the historian of Shi'a Islam Heinz Halm comments, "The alleged descent of the dynasty from Ali ibn Abi Talib and Muhammad's daughter Fatima has been called into question by contemporaries from the very beginning and cannot be proven", while Michael Brett, an expert on the Fatimids, asserts that "a factual answer to the question of their identity is impossible".

The main problem arises with the succession linking al-Mahdi with Ja'far al-Sadiq. According to Isma'ili doctrine, the imams that followed Muhammad ibn Isma'il were in concealment, but early Isma'ili sources do not mention them, and even later, official Isma'ili genealogies diverge on the number, names and identities of these 'hidden imams' , a problem complicated by the Isma'ili claims that the hidden imams assumed various aliases for safety. Thus the pro-Isma'ili Prince Peter Hagop Mamour, in his 1934 apologetic work Polemics on the Origin of the Fatimi Caliphs, lists no fewer than fifty variations of the line of the four hidden imams between Isma'il ibn Ja'far and al-Mahdi, claiming that the various names represent pseudonyms. Early Isma'ili sources tend to be silent on the matter, from a mixture of both religious imperative—since God has decreed his imams to be hidden, they should remain so—and apparent ignorance. Al-Mahdi himself, in a letter sent to the Isma'ili community in Yemen, even claimed not to be descended from Isma'il ibn Ja'far, but from his older brother Abdallah al-Aftah, who is generally held to not have had any descendants at all. Notably, later official Fatimid genealogies rejected this version. In addition, it appears that the first known ancestor of the Fatimid line, Abdallah al-Akbar, the great-grandfather of the first Fatimid caliph, initially claimed descent not from Ali at all, but from his brother Aqil ibn Abi Talib, and was accepted as such by the Aqilids of Basra. According to Brett, the line of descent claimed by the Fatimid between Ja'far al-Sadiq and al-Mahdi reflects "historical beliefs rather than historical figures, for which there is little or no independent confirmation", as even Isma'il ibn Ja'far is an obscure figure, let alone his supposed hidden successors.

While pro-Fatimid sources emphasize their Alid descent—the dynasty named itself simply as the 'Alid dynasty' —many Sunni sources instead refer to them as the 'Ubaydids' (بنو عبيد), after the diminutive form Ubayd Allah for al-Mahdi's name, commonly used in Sunni sources with an apparently pejorative intent. Medieval anti-Fatimid polemicists, starting with Ibn Rizam and Akhu Muhsin, were keen to discredit Isma'ilism as an antinomian heresy and generally considered Fatimid claims to Alid descent fraudulent. Instead, they put forth a counter claim that al-Mahdi descended from Abdallah, the son of a certain Maymun al-Qaddah from Khuzistan, that al-Mahdi's real name was Sa'id, or that al-Mahdi's father was in reality a Jew (a common antisemitic trope among medieval Arab authors). While several medieval Sunni authors and contemporary potentates—including the impeccably Alid sharifs of Mecca and Medina—accepted or appeared to accept Fatimid claims at face value, this anti-Isma'ili 'black legend', as the modern scholar Farhad Daftary calls it, influenced Sunni historiographers throughout the following centuries, and became official doctrine with the Baghdad Manifesto of 1011. Due to the paucity of actual Isma'ili material until Isma'ili sources started to become available and undergo scholarly examination during the 20th century, the Sunni version was adopted even by some early modern Orientalists.

Early Isma'ili sources ignore the existence of Maymun al-Qaddah, but later, Fatimid-era sources were forced to confront their opponents' claims about his person, and tried to reconcile the conflicting genealogies accordingly. Some sectarian Isma'ili—especially Druze—sources even claimed that during the period of concealment of the Isma'ili imams, the Isma'ili movement was actually led by the descendants of Maymun al-Qaddah, until the restoration of the true line with the Fatimid caliphs. Later Tayyibi Isma'ili authors also used the figures of Maymun al-Qaddah and his son Abdallah to argue for the legality of there being a substitute or representative of the imam, whenever the latter was underage. A further controversy that emerged already in medieval times is whether the second Fatimid caliph, Muhammad al-Qa'im bi-Amr Allah, was the son of al-Mahdi, or whether the latter was merely usurping the position of a still-hidden imam; that would mean that al-Qa'im was the first true Fatimid imam-caliph.

Modern authors have tried to reconcile the genealogies. In Origins of Ismāʿı̄lism, the Arabist Bernard Lewis suggested the existence of two parallel series of imams: trustee imams, descended from Maymun al-Qaddah, whose task was to hide and protect the existence of the real  imams. Lewis posited that al-Mahdi was the last of that line, and that al-Qa'im was the first of the imams to sit on the throne. Research by Vladimir Ivanov, on the other hand, has conclusively shown that the supposed Qaddahite descent of the Fatimids is a legend, likely invented by Ibn Rizam himself: the historical Maymun al-Qaddah is now known to have been a disciple of Muhammad al-Baqir (recognized by both Isma'ilis and Twelvers as an imam), and both he and his son Abdallah hailed from the Hejaz. For reasons of chronology alone, Ibn Rizam's version is thus proven to be untenable. Access to more sources has furthermore led to the partial reconciliation of the conflicting accounts by positing that some of the variant names in the genealogies were indeed cover names for the Isma'ili imams: thus Maymun ('the Fortunate One') is suggested as the sobriquet for Muhammad ibn Isma'il, especially since a source connects him with a sect known as the Maymuniyya. This explanation is also present in an epistle by the fourth Fatimid caliph, al-Mu'izz, in 965. This would make the claim of al-Mahdi's descent from an 'Abdallah ibn Maymun' actually correct, and lead hostile sources to confuse him with the earlier Shi'a figure. Another suggestion, by Abbas Hamdani and F. de Blois, is that the officially published genealogies represent a compromise between two different lines of descent from Ja'far al-Sadiq, one from Isma'il and another (per al-Mahdi's letter to the Yemenis) from Abdallah al-Aftah. Other scholars, such as Halm, remain skeptical, while Omert Schrier and Michael Brett dismiss the Fatimid claims of Alid descent entirely as a pious fiction.

The Fatimids and the early Isma'ili
Both the Twelvers and the Seveners held that their final imams were not dead, but had simply gone into concealment, and that they would soon return as a messiah, the ('the Rightly Guided One') or  ('He Who Arises'), to usher in the end times. The would rapidly overthrow the usurping Abbasids and destroy their capital Baghdad, restore the unity of the Muslims, conquer Constantinople, ensure the final triumph of Islam and establish a reign of peace and justice. The Isma'ilis in particular believed that the would reveal the true, 'inner'  meaning of religion, which was until then reserved for a few select initiates. The would abolish the 'outer' (zahir) forms and strictures of Islam, since henceforth the true religion, the religion of Adam, would be manifested without the need for symbols and other mediating devices.

While the Muhammad ibn Isma'il remained hidden, however, he would need to be represented by agents, who would gather the faithful, spread the word (, 'invitation, calling'), and prepare his return. The head of this secret network was the living proof of the imam's existence, the. The first known was Abdallah al-Akbar, a wealthy merchant from Askar Mukram, in what is now southwestern Iran. Apart from improbable stories circulated by later anti-Isma'ili polemicists, his exact origin is unknown. His teachings led to his being forced to flee his native city to escape persecution by the Abbasid authorities, and seek refuge in Basra. Once again, his teachings attracted the attention of the authorities, and he moved on to the small town of Salamiyah on the western edge of the Syrian Desert. There he settled as a merchant from Basra, and had two sons, Ahmad and Ibrahim. When Abdallah died c. 827/8, Ahmad succeeded his father as the head of the Isma'ili movement, and was in turn succeeded by his younger son, Muhammad, known as Abu'l-Shalaghlagh. In later Fatimid doctrine, Abdallah al-Akbar was presented as the eldest son of Muhammad ibn Isma'il, and his successor as imam, followed by Ahmad. While Muhammad Abu'l-Shalaghlagh was the head of the, however, the imamate passed to another son, al-Husayn (d. 881/2), and thence to al-Husayn's son, Abdallah or Sa'id, the future Caliph al-Mahdi, who was born in 873/4. Isma'ili texts suggest that Abu'l-Shalaghlagh was the guardian and tutor of al-Mahdi, but also that he tried to usurp the succession for his own sons but failed, as the latter all died prematurely.

During the late ninth century, millennialist expectations increased in the Muslim world, coinciding with a deep crisis of the Abbasid Caliphate during the decade-long Anarchy at Samarra, the rise of breakaway and autonomous regimes in the provinces, and the large-scale Zanj Rebellion, whose leader claimed Alid descent and proclaimed himself as the. In this chaotic atmosphere, and with the Abbasids preoccupied with suppressing the Zanj uprising, the Isma'ili spread rapidly, aided by dissatisfaction among Twelver adherents with the political quietism of their leadership and the recent disappearance of their twelfth imam. Missionaries (s) like Hamdan Qarmat and his brother-in-law Abu Muhammad Abdan spread the network of agents to the area round Kufa in the late 870s, and from there to Yemen (Ibn Hawshab, 882) and thence India (884), Bahrayn (Abu Sa'id al-Jannabi, 899), Persia, and Ifriqiya (Abu Abdallah al-Shi'i, 893). The real leadership of the movement remained hidden at Salamiyah, and only the chief s of each region, such as Hamdan Qarmat, knew and corresponded with it. The true head of the movement remained hidden even from the senior missionaries, however, and a certain Fayruz functioned as chief missionary and 'gateway'  to the hidden leader.

Qarmatian schism and flight to the Maghreb
In about 899, Abdallah ibn al-Husayn assumed the leadership of the. Soon, he began making alterations to the doctrine, which worried Hamdan Qarmat. Abdan went to Salamiyah to investigate the matter, and learned that Abdallah claimed that the expected was not Muhammad ibn Isma'il, as commonly propagated, but Abdallah himself, and that Abdallah's ancestors, far from being simply the s of the imams, were actually the imams themselves. In a letter to the Yemeni community, Abdallah claimed that 'Muhammad ibn Isma'il' was actually a cover name assumed by each incumbent imam, and denied any particular role of Muhammad ibn Isma'il as the expected who was to usher in the end times. These doctrinal innovations caused a major rift in the movement, as Hamdan denounced the leadership in Salamiyah, gathered the Iraqi s and ordered them to cease the missionary effort. Shortly after this Hamdan "disappeared" from his headquarters, and Abdan was assassinated by Zakarawayh ibn Mihrawayh, who had remained loyal to Salamiyah.

The schism left the early Isma'ili divided into two factions: those who accepted Abdallah's claims, and continued to follow him, and became the Isma'ilis proper, and those who rejected them and continued to believe in the return of Muhammad ibn Isma'il as, who became known as the Qarmatians (although anti-Fatimid sources also used the label for the Fatimids themselves). In Iraq and Persia, the community was split between the two factions, but in Bahrayn, the local s split off from Salamiyah and established an independent Qarmatian state that lasted into the 1070s. On the other hand, Zakarawayh and his loyalists now began a series of anti-Abbasid uprisings in Iraq and Syria in 902–907, with the support of the Bedouin tribes. Calling themselves the, the uprisings enjoyed some ephemeral success, but were eventually suppressed by the still potent Abbasid army. Zakarawayh apparently moved without Abdallah's authorization or prior knowledge, and thus placed him in danger: the Abbasid authorities began a crackdown on the, and Zakarawayh's sons unwittingly revealed the location and identity of Abdallah to the Abbasids, who launched a man-hunt against him. Already in 902, Abdallah with his household left Salamiyah for Ramla. As the revolts instigated by Zakarawayh were suppressed, Abdallah moved to Tulunid Egypt in early 904. As the Abbasids recovered control of Egypt in the next year, the small party fled again. While his companions expected to head to Yemen, where the Isma'ili had enjoyed great success, Abdallah turned westward, and established himself at the oasis town of Sijilmasa, in what is now southwestern Morocco, in August 905.

Establishment of the Fatimid Caliphate
In the meantime, in Ifriqiya, the Abu Abdallah al-Shi'i had managed to convert the Berber tribe of the Kutama to the Isma'ili cause. From 902 on, the Kutama had gradually conquered the region from its Abbasid clients, the Aghlabids. On 25 March 909, Abu Abdallah and his Kutama entered the Aghlabid palace city of Raqqada in triumph. The proclaimed a Shi'a regime, but kept the name of his master secret as yet, only using the title, 'God's proof'; and soon set out westward, at the head of a large army, to bring his imam to Ifriqiya. The Kutama army destroyed the Kharijite Rustamid emirate on its way, and arrived at Sijilmasa in August 909. There Abdallah was acclaimed caliph by the troops. On 4 January 910, Abdallah entered Raqqada, where he publicly proclaimed himself caliph with the regnal title of, 'the imam rightly guided by God'.

The first crisis of the new regime occurred quickly. Abu Abdallah al-Shi'i and his brother demanded proof of Abdallah being the, or resented the limitations on their authority placed by the new ruler. Al-Mahdi Billah was able to eliminate them in 911, but this led to a Kutama revolt, led by a child as a figurehead. The uprising was defeated, and the Fatimid control over the Kutama consolidated. Nevertheless, Fatimid power remained fragile, as it was based almost exclusively on the—often truculent—Kutama, and later the Sanhaja tribe as well. Conversely, the local Arabs of Ifriqiya were Maliki Sunnis, while most Berber tribes further west—notably the Zenata confederation—adhered to various forms of Kharijism, and thus opposed to the Isma'ili regime of the Fatimids.

Imperial expansion
Given the semi-divine status they claimed as the rightful imams of Islam, the Fatimids' ambitions were not limited to Ifriqiya. The Fatimid caliphs aimed to overthrow not only the rival Muslim monarchs—the Abbasids of Baghdad and the Umayyads of Cordoba—but also the Byzantine Empire, claiming a divine right to universal sovereignty.

Fatimid power quickly expanded across the sea to Sicily, which had been conquered by the Aghlabids from the Byzantines, but Fatimid rule was established there only after a series of revolts by the local Muslims, who at times declared for the Abbasids, were suppressed. Sicily was also important as a battleground against the Byzantines, which among other things allowed the Fatimids to present themselves as champions of Islam, engaged in holy war against the infidels. In practice, relations were often more pragmatic, and warfare alternated with periods of truce. From 948 on, a series of hereditary governors, the Kalbid dynasty, governed Sicily on the Fatimids' behalf.

The Fatimids also expanded west to the rest of the Maghreb, where Fez and Sijilmasa were captured in 920–921, although these conquests were difficult to hold, and brought the Fatimids into conflict with the Umayyads of Cordoba. In an attempt to supplant the Abbasids, al-Mahdi's son and heir, al-Qa'im bi-Amr Allah, led campaigns eastward to capture Egypt in 914 and 919. Both endeavours failed, leaving only the Cyrenaica in Fatimid hands.

Revolt of Abu Yazid
Between 916 and 921, al-Mahdi built a new residence, the fortified palace city of Mahdiyya, on a rocky promontory on the Ifriqiyan coast. When Al-Mahdi died in 934, he was succeeded by his son, al-Qa'im ((r. 934 – 946)), who continued his father's policies. Another attempted invasion of Egypt in 935 was defeated by the country's new strongman ruler, Muhammad ibn Tughj al-Ikhshid.

The most notable event of al-Qa'im's reign was the revolt of the Zenata Berbers under the Khariji preacher Abu Yazid in 943/44: almost all of Ifriqiya succumbed to the rebels, and in January 945, the rebels laid siege to Mahdiyya itself. Al-Qa'im died during the siege, and was succeeded by his son, Abu Tahir Isma'il ((r. 946 – 953)). The new caliph concealed his father's death, took to the field, and in a series of battles defeated the rebel armies and captured Abu Yazid in August 947. The victory over the rebel leader, who had almost destroyed the Fatimid state and was symbolically called the ('the false Messiah') by the Isma'ili, was the moment when Abu Tahir declared himself as the imam and caliph in succession to his father, with the name of al-Mansur bi-Nasr Allah ('The Victor with the Help of God'). Al-Mansur moved the Fatimid court to a new palace city, al-Mansuriyya near Kairouan, but died soon after, and was succeeded by his son, al-Mu'izz li-Din Allah ((r. 953 – 975)).

Conquest of Egypt and move of the capital to Cairo
Al-Mu'izz was an excellent planner and organizer, and the state he inherited had regained internal stability, after the turmoils of Abu Yazid's revolt. His early reign saw successes against the Byzantines, where the last remaining Byzantine strongholds were extinguished with the Fall of Rometta in 965, as well as the reconquest of the western Maghreb by the Fatimid general Jawhar in 958–960, temporarily expelling Umayyad influence from the region and extending Fatimid rule to the shores of the Atlantic Ocean.

After these successes, al-Mu'izz once again turned to the abandoned project of the conquest of Egypt. Meticulous military and political preparations were undertaken, and the agents of the Isma'ili engaged to promote the Fatimid cause in Egypt and suborn officials of the weakened Ikhshidid regime. As a result, when the Fatimid army under Jawhar arrived in Egypt in summer 969, it faced little organized resistance. Jawhar entered the Egyptian capital, Fustat, in July 969, and claimed the country for his master. Immediately he began establishing a new capital city near Fustat, which came to be known as ('the Victorious One of al-Mu'izz'), modern Cairo.

Jawhar governed Egypt for the next four years as viceroy of al-Mu'izz, restoring the country's finances. It was not until August 972 that al-Mu'izz left Ifriqiya, appointing the Berber Buluggin ibn Ziri as his viceroy there. In June 973, the Fatimid court arrived in Egypt and al-Mu'izz took up residence in Cairo.

Expansion into Syria
In the meantime, immediately after the conquest if Egypt Jawhar had tried to extend Fatimid rule into Syria. The first Fatimid invasion failed largely due to the opposition of the Qarmatians of Bahrayn, who did not hesitate to align themselves with the Abbasid caliph and denounce al-Mu'izz in public. The Qarmatian leader al-Hasan al-A'sam led two invasions of Egypt in 971 and again, despite al-Mu'izz's efforts to win him over, in 974. Both invasions were beaten back at the gates of Cairo, forcing the Qarmatians to retreat to Bahrayn, and opening the path for a renewed Fatimid attempt to conquer Syria. At the same time, around 970/71, the two holy cities of Mecca and Medina, recognized Fatimid suzerainty, an important symbolic victory for the Fatimids.

In 978, Caliph al-Aziz ((r. 975 – 996)) captured Damascus, but Fatimid power in Syria continued to be challenged, whether by powerful generals or by the restive Bedouin of Palestine under the Jarrahids. Al-Aziz's attempts to capture the Hamdanid emirate of Aleppo brought the Fatimids into conflict with the Byzantines, who considered the city their protectorate. Attempts to take Aleppo failed in 983, 992/3 and 994/5, and effective Fatimid power reached little past Tripoli in the north. In 987, the Fatimid suzerainty was recognized by the Ya'furids in Yemen, but Fatimid attempts to induce the fellow Shi'a rulers of Iraq, the Buyids, to recognize their suzerainty, failed; the Buyids rejected the Fatimids' claims of Alid descent. Al-Aziz's reign saw also a transformation in the structure and nature of the Fatimid state: the Kutama, who had been the main pillar of the early Fatimid regime, were now complemented by Turkish military slaves (ghilman) as well as Black African slave soldiers, while under the guidance of Ya'qub ibn Killis, the Fatimid administration became organized and regularized.

Reign of al-Hakim
Al-Aziz died in 996, while preparing a major campaign against the Byzantines and Hamdanids. He was succeeded by his eleven-year-old son, al-Hakim ((r. 996 – 1021)). Initially under the tutelage of powerful officials, al-Hakim managed to seize the reins of power for himself in 1000. The early years of his reign saw the conclusion of peace with Byzantium in 1001, as well as the great tribal revolts of Abu Rukwa in Cyrenaica in 1005, and of Mufarrij ibn Daghfal in Palestine in 1012–13. In the north, the Uqaylids of Mosul briefly acknowledged Fatimid suzerainty in 1010, and in 1015, Aleppo did the same, with Fatimid troops entering the city and imposing direct control in 1017. Relations with the Zirids, who quickly had begun distancing themselves from Cairo's authority, became more strained under al-Hakim due to disputes over Cyrenaica and Tripoli, and in 1016/7, the new Zirid emir, al-Mu'izz ibn Badis, launched a pogrom against the remaining Isma'ilis in Ifriqiya.

From 1015 on, the Fatimid Caliphate, and the Isma'ili community, were confronted by a rise in sectarianism: a series of preachers who propagated extremist versions of Isma'ilism appeared, preaching the imminence of the end times, the divinity of al-Hakim, and the abolition of the Sharia. The Fatimid religious establishment opposed such antinomian views, but al-Hakim seems to have tolerated, if not encouraged them. Although al-Hakim never officially espoused their views, the teachings of men such as al-Darzi and Hamza ibn Ali resulted in the birth of the Druze faith. At the same time, al-Hakim made curious innovations in the succession, by splitting up his office in two: one to succeed the caliphate, i.e. the secular office, and one to succeed as imam, i.e. as leader of the Isma'ili community. Furthermore, he sidelined his own son and appointed two cousins to the posts, thereby arousing the hostility of the Fatimid elites. As a result of a conspiracy among the latter, al-Hakim was murdered during one of his night rides outside Cairo, and his corpse disposed of, never to be found.

The dynasty in power
Members of the dynasty were carefully kept out of public affairs; even princes and princesses of the blood did not have a special position at court, let alone being entrusted with the governance of provinces or the command of armies as in other medieval states, which might result in an independent power base that could threaten the orderly father-to-son succession of the imamate and caliphate. For similar reasons, Fatimid princesses were usually not wed outside the family, and the caliphs themselves did not usually engage in a full marriage, but had slave concubines, who could rise to the high status of an umm walad upon the birth of a son. This led to differences in rank: a detailed list of court precedence from 1122, during the reign of al-Amir, the caliph's single full brother, Ja'far, is accorded first place in the hierarchy, while their half-brothers from other women are listed much lower, after the caliph's own concubines.

Nevertheless, the members of the dynasty enjoyed immense riches, founded on the possession of properties in the capital, Cairo, and its environs, as well as commerce. The caliph himself was not above such enrichment, and owned extensive parts of Cairo; according to the mid-11th traveller Nasir Khusraw, all 20,000 shops in the city, as well as its caravanserais and baths, and 8,000 other buildings that paid a monthly rent to the caliph's private purse (diwan al-khass) or the private treasury (khizana al-khass). Fatimid princesses are likewise recorded as being extremely wealthy, in part from estates allocated to them, and in part due to their own commercial and entrepreneurial activities. Thus at their death in 1050/51, two daughters of Caliph al-Mu'izz left estates of about 1.7 million gold dinars each, while Sitt al-Mulk is known to have employed an extensive staff of able administrators of both sexes for her far-flung economic interests.

Genealogy according to al-Mahdi's letter to the Yemeni community
denotes imams, regnal names in bold