Al-Hafiz
Abūʾl-Maymūn ʿAbd al-Majīd ibn Muḥammad ibn al-Mustanṣir, better known by his regnal name as al-Ḥāfiẓ li-Dīn Allāh, was the eleventh Fatimid caliph, ruling over Egypt from 1132 to his death in 1149, and the 21st imam of Hafizi Isma'ilism.
Al-Hafiz first rose to power as regent after the death of his cousin, al-Amir bi-Ahkam Allah, in October 1130. Al-Amir had only left an infant son, al-Tayyib, as a possible successor, so al-Hafiz—as the oldest surviving member of the dynasty—became regent. Al-Tayyib was apparently sidelined and possibly killed by the new regime, which was in turn overthrown within a few days by the army under Kutayfat. The latter imprisoned al-Hafiz, and moved to depose the Fatimids and replace Isma'ilism with a personal regime, possibly based on Twelver Shi'ism, with himself as the Hidden Imam's all-powerful vicegerent. Kutayfat's regime was toppled when he was murdered by Fatimid loyalists in December 1131, and al-Hafiz was freed and restored as regent.
On 23 January 1132, al-Hafiz proclaimed himself as the legitimate Isma'ili imam and caliph. While necessary in view of the lack of another heir, the succession was highly irregular, as the Isma'ili imamate had previously only been passed from father to son, by explicit designation. Al-Hafiz was largely accepted in the Fatimid-ruled territories, but many Isma'ili followers abroad refused to recognize him and regarded the vanished al-Tayyib as their imam, causing the Hafizi–Tayyibi schism in Musta'li Isma'ilism. Even in Egypt, his legitimacy was repeatedly challenged, and his reign was troubled by constant uprisings and power struggles. In an effort to bolster his legitimacy, al-Hafiz was particularly active in the construction and restoration of shrines dedicated to members of the wider Alid family. Al-Hafiz's reign was mostly quiet on the external front. Despite continuing hostilities with the Kingdom of Jerusalem around Ascalon, both powers were preoccupied elsewhere for the most part. The Fatimid court also maintained contact with the Burids in Syria and King Roger II of Sicily, who at this time began his expansion into the former Fatimid domains of Ifriqiya, and adopted many of the practices of the Fatimid court for his own administration.
As ruler, al-Hafiz tried to rein in his over-mighty viziers, with mixed success. He was repeatedly forced to give way to the demands of various military factions, and was ultimately unable to halt the evolution of the vizierate into a de facto sultanate independent of the caliph. Thus al-Hafiz's own son Hasan forced him to name him vizier in 1134, ousting another of the Caliph's sons from the post. Hasan's reign proved tyrannical and he was overthrown by the army in March 1135. The appointment of the Christian Bahram al-Armani to the vizierate after that caused a severe reaction among the Muslim population due to Bahram's pro-Christian policies. This led to another uprising and the appointment of the Sunni Ridwan ibn Walakhshi to the vizierate in 1137. Ridwan not only instituted anti-Christian and anti-Jewish measures, but aimed to overthrow al-Hafiz and replace the Fatimid dynasty with a Sunni regime headed by himself. With the support of the Cairo populace, al-Hafiz thwarted his ambitions and ousted Ridwan in 1139. For the next ten years, the Caliph ruled without a vizier, instead entrusting the administration to a succession of secretaries, with Ibn Masal as leading minister. This period was plagued by uprisings and natural disasters, but al-Hafiz persevered until his death in October 1149. His successors would be reduced to puppets at the hands of powerful viziers, until the end of the Fatimid Caliphate in 1171.
Early life
The future al-Hafiz was born as Abd al-Majid at Ascalon in AH 467 or 468. His father was Abu'l-Qasim Muhammad, a son of the reigning Fatimid caliph, al-Mustansir. In later life he was also called by the epithet of Abu'l-Maymun. His early life, before he was thrust to the forefront of politics, is almost unknown. As an adult, he is reported to have had a strong mind and mild nature, fond of hoarding things, and to be strongly interested in alchemy and astronomy; he is known to have kept several astronomers in his employ.Regency and imprisonment
On 7 October 1130, Caliph al-Amir bi-Ahkam Allah was assassinated. He left only a six-month-old son, Abu'l-Qasim al-Tayyib, to succeed him, with no designated regent or serving vizier, as al-Amir had resumed the personal direction of government affairs, instead of entrusting the administration to a potentially dangerously powerful vizier. Al-Amir's murder put a premature end to his attempts to once again concentrate power in the hands of the caliph instead of over-mighty generals and ministers. Given the fragility of succession, it furthermore endangered the very survival of the Fatimid dynasty.At this time, Abd al-Majid was the oldest surviving male of the dynasty. What happened next appears to have effectively been a coup: two of al-Amir's favourites, Hizar al-Mulk Hazarmard and Barghash, who had influence over the army, allied themselves with Abd al-Majid, to control the government. Abd al-Majid was to become regent, while Hazarmard would become vizier, and the Armenian Abu'l-Fath Yanis the commander-in-chief and chamberlain to the regent. Hazarmard evidently hoped to establish himself as a quasi-sultan in the style of the all-powerful Armenian vizier Badr al-Jamali and his son al-Afdal Shahanshah while Abd al-Majid may have supported him with the aim of gaining the throne for himself.
As de facto head of state, Abd al-Majid used the title of. Previously this was the formal title of the Fatimids' designated successor, but in this context is to be understood as regent. It is unclear, however, in whose name this regency was exercised. Most sources report that even the existence of al-Amir's infant son was concealed, and al-Tayyib disappears completely from the record after that. How the existence of a child whose birth had been accompanied by public celebrations and proclamations, was so effectively concealed is unknown. Modern scholars speculate that al-Tayyib may have died in infancy, possibly even before his father; but at least one contemporary anonymous Syrian source maintains that he was murdered on Abd al-Majid's orders. Instead of al-Tayyib, the new regime maintained that al-Amir had left a pregnant concubine, and that the caliph, having dreamed of his impending death, had declared this unborn child to be a son and his designated successor, thus effectively bypassing al-Tayyib. What came of this pregnancy is likewise unclear, as different sources report that the concubine either bore a daughter or that the foetus could not be found, or that al-Hafiz killed the baby soon after.
File:The story of Cairo .jpg|thumb|250px|alt=Old black-and-white map of Cairo|A plan of Fatimid-era Cairo, as reconstructed by Stanley Lane-Poole, showing the approximate layout of the city and the location of the palaces
Whatever the ambitions and intentions of the leaders of the new regime were, they were cut short within a fortnight of al-Amir's death. At the ceremony of the new vizier's investiture, the army, assembled at the Bayn al-Qasrayn square between the caliphal palaces, rose in revolt and demanded the appointment of Kutayfat, the only surviving son of al-Afdal Shahanshah, as vizier. The palace was invaded, Hazarmard was executed and his severed head carried through the streets of Cairo, and on 21 October, Kutayfat was invested as vizier with the titles of his father and grandfather. Formally, Abd al-Majid retained his position of regent, and coins and decrees were issued jointly in his name and that of Kutayfat. In reality, Abd al-Majid was held a prisoner in one of the palace treasuries, guarded by the military commander Ridwan ibn Walakhshi. Soon, however—possibly after the expected birth of a male heir did not occur—Kutayfat proclaimed the dynasty deposed, and abandoned Isma'ilism as the state religion. He instead proclaimed himself as the vicegerent of a shadowy 'Expected One' and 'Rightly-Guided' imam, who was given no name other than the Abu'l-Qasim. The medieval sources explain this as a turn to Twelver Shi'ism, where expectation of the Hidden Imam is a core tenet. The historian Heinz Halm points out that this is nowhere explicitly attested in Kutayfat's own proclamations. Rather, Kutayfat's claim was a convenient political device which not only sidestepped the Fatimid claims to the imamate, but allowed him to rule, in the words of the historian Samuel Miklos Stern, "as a dictator responsible to no one either in theory or practice". Halm also considers that it was Kutayfat who at this point eliminated al-Tayyib.
Rise to the throne and the Hafizi–Tayyibi schism
The Fatimid elites refused to accept these changes. Members of al-Amir's bodyguard assassinated Kutayfat in a counter-coup on 8 December 1131 and released Abd al-Majid from his prison. This restoration of the dynasty was thereafter commemorated annually, up until the end of the Fatimid Caliphate, as the 'Feast of Victory'.Given his lack of legitimation, as he was not in the line of succession to al-Amir, Abd al-Majid initially continued ruling as a regent. The first coins of his reign were struck with him still bearing the title of. Whether Abd al-Majid had had designs on the caliphate or not, the lack of a direct heir meant that the continuation of the Fatimid dynasty and the Isma'ili imamate required that he succeed as imam and caliph, since according to Isma'ili doctrine, "God does not leave the Moslem Community without an Imam to lead them on the right path". This was done in a decree on 23 January 1132, whereby Abd al-Majid assumed the title . For the first time in the Fatimid dynasty, power was not passed from father to son, creating a radical departure from established practice that had to be addressed and justified. Thus the proclaimed al-Hafiz's right to the imamate, likening it to the sun, which had been briefly eclipsed by al-Amir's death and Kutayfat's usurpation, but had now reappeared in accordance with the divine purpose. No reference to any son of al-Amir was made. Al-Hafiz claimed that he had—secretly—received the designation as successor by al-Amir, and that Caliph al-Mustansir had foreseen this event, and had called al-Hafiz's father as. Earlier examples of breaks in the direct succession of the imamate, chiefly the designation by Muhammad of his son-in-law Ali ibn Abi Talib, were brought up to buttress his claim.
Al-Hafiz's highly irregular accession and claims to the imamate were largely accepted by the Isma'ili faithful in the Fatimid domains in Egypt, Nubia, and the Levant, but rebuffed by some communities. Most notably, this was the case in the only other major Isma'ili realm, Yemen, where the hitherto staunchly pro-Fatimid Sulayhid dynasty broke up. The Sulayhid queen, Arwa, upheld the rights of al-Tayyib, whose birth had been announced to her in a letter by al-Amir, while the regional dynasties of the Hamdanids and the Zurayids recognized al-Hafiz's claims.
The issue was not merely political, but, given the pivotal role of the imam in the Isma'ili faith, also intensely religious. In the words of Stern, "on it depended the continuity of institutional religion as well as the personal salvation of the believer". A similar succession dispute in 1094/5 had already led to the disastrous Musta'li–Nizari schism: after the death of al-Mustansir, al-Afdal Shahanshah had raised al-Musta'li Billah to the caliphate instead of his older brother, Nizar, leading to a brief civil war and Nizar's execution. While al-Musta'li had been recognized by the Fatimid establishment and the Isma'ili communities dependent on it in Syria and Yemen, the Iranian Isma'ilis had largely adopted Nizar's claims to the imamate and broken off their relations with the Fatimids. The Nizaris remained implacably opposed to the Musta'li regime in Cairo, and their agents were blamed for the murder of al-Afdal in 1121, and of al-Amir. Al-Hafiz's accession in turn produced a major schism in the Musta'li branch of Isma'ilism, between the adherents of the imamate of al-Tayyib pitted against supporters of al-Hafiz and his successors. As Stern emphasizes, in both cases the issue was "not so much the person of the claimant that weighed with his followers; they were not moved by any superior merits of Nizar as a ruler —it was the divine right personified in the legitimate heir that counted".
Thus, by 1132 the once unified Isma'ili movement had split into three branches: the Hafizi, which now became the official doctrine of the Fatimid realm, the Tayyibi, which mostly survived in the mountains of Yemen, and the Nizari. Apart from Yemen, Tayyibi supporters existed in Egypt as well as in the Levant, but they were apparently heavily persecuted by the Fatimids. The Hafizi branch, inextricably bound to the Fatimid regime, survived in Egypt until the fall of the Fatimid Caliphate in 1171, but it disappeared quickly after, unlike its two rivals, which survive to the present day. The last holdout of Hafizi Isma'ilism was Yemen, where significant communities survived into the 13th century.