Hafizi Isma'ilism ( or , ) was a branch of Musta'li Isma'ilism that emerged as a result of a split in 1132. The Hafizis accepted the Fatimid caliph Abd al-Majid al-Hafiz li-Din Allah () and his successors as imams, while the rival Tayyibi branch rejected them as usurpers, favouring the succession of the imamate along the line of al-Hafiz's nephew, al-Tayyib.

The Hafizi sect lost state backing and gradually disappeared after the abolishment of the Fatimid Caliphate in 1171 and the conquest of the Fatimid-aligned dynasties of Yemen by the Ayyubid dynasty shortly after. The last remnants of the Hafizi branch are attested in the 14th century in Egypt and Syria, but had died out by the 15th century.

Origin: the Hafizi–Tayyibi schism
The Hafizi branch of Isma'ilism has its origin in the assassination of the tenth Fatimid caliph, and twentieth Musta'li Isma'ili imam, al-Amir bi-Ahkam Allah () on 7 October 1130. Al-Amir left only a six-month-old son, al-Tayyib, to succeed him, with no designated regent or a serving vizier who could assume that role. As a result, Abd al-Majid, a cousin of al-Amir and then the oldest surviving male of the dynasty, was proclaimed regent with the backing of a few of al-Amir's senior officials. 

It is unclear, however, whether that regency was in the name of the infant al-Tayyib, who disappears completely from the record at this point. 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 fetus could not be found. In the event, this concern proved moot, for within a fortnight of al-Amir's death, a military coup brought the strongman Kutayfat to power. Kutayfat all but abolished the Fatimid regime, and began dismantling Isma'ilism as the official doctrine of the state. At this point, at the latest, al-Tayyib was eliminated. Kutayfat's regime was overthrown when he was assassinated by Fatimid loyalists on 8 December 1131. Abd al-Majid was released from his prison and restored as regent. 

Whether Abd al-Majid had previously harboured designs on the caliphate or not, the lack of an heir to al-Amir 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  ("Keeper of God's Religion"). For the first time in the Fatimid dynasty, power was not passed from father to son. This radical departure from established practice 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. 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 accession produced a major schism in the Musta'li branch of Isma'ilism, between the adherents of the imamate of al-Tayyib (the "Tayyibis"), pitted against supporters of al-Hafiz and his successors (the "Hafizis"). Al-Hafiz was largely accepted by the Isma'ili faithful in the Fatimid-ruled domains in Egypt, Nubia, and the Levant, but rebuffed by some of the Isma'ili communities abroad. Most notably, this was the case in the only other major Isma'ili-ruled region, 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". As Stern emphasizes, the issue was "not so much the person of the claimant that weighed with his followers [...] (this is, of course, obvious in the case of the infant al-Tayyib) — it was the divine right personified in the legitimate heir that counted".

History
Inextricably bound to the Fatimid regime, the Hafizi sect survived until the fall of the Fatimid Caliphate in 1171, but declined and disappeared quickly after, unlike its two rival branches, the Nizaris and Tayyibis, which survive to the present day.

Egypt
Hafizi Isma'ilism remained the state religion in Egypt until Saladin proclaimed the suzerainty of the Abbasid caliphs over Egypt in September 1171. Upon the death of the imam–caliph al-Adid shortly after, the members of the Fatimid family were placed under effective house arrest in the palace. Al-Adid's eldest son and designated heir, Dawud, was recognized by the Hafizi faithful as the rightful imam, but he, like his own son and successor Sulayman Badr al-Din, lived and died in captivity. 

The mostly Hafizi Egyptian Isma'ilis were persecuted by the new Ayyubid regime, with many fleeing to Upper Egypt. A series of abortive conspiracies and uprisings under pro-Fatimid sympathizers or Fatimid pretenders erupted in the 1170s and continued sporadically, with much diminished impact, until the end of the century. As a result of a pro-Fatimid conspiracy, which included several of the last Fatimid officials and the poet Umara ibn Abi al-Hasan al-Yamani, in Cairo in 1174, many of the supporters of the deposed dynasty were exiled to Upper Egypt, which became a hotbed of pro-Fatimid activity. A rebellion erupted there in late summer 1174, under Kanz al-Dawla, but was suppressed. In 1176/7 a pretender claiming to be Dawud found wide support in Qift in northern Egypt. By 1188, however, an attempted uprising by a small group who called out the Shi'a cry 'Family of Ali' during the night, found no response from the people of Cairo. When the real Dawud died as a prisoner in Cairo in 1207/8, the Hafizis asked the Ayyubid sultan al-Adil I for permission to mourn him in public. The sultan granted them permission, but used the occasion to arrest their da'is and confiscate their property.

Despite the separation of male and female prisoners, Dawud apparently managed to beget two sons in secret, the eldest of whom, Sulayman, was recognized by the Hafizi faithful as his successor. Sulayman ibn Dawud died in 1248, apparently childless, but some of his partisans claimed that he had a son who was hidden. As late as 1298, a pretender claiming to be the son of Sulayman ibn Dawud appeared in Upper Egypt, but by this time the Hafizis—and Isma'ilism in general—had been reduced to small isolated enclaves. Still later, about the year 1324, an Isma'ili (and likely Hafizi) community is recorded in Usfun in Upper Egypt, and in Syria a Hafizi community is mentioned at the same time in the Baqi'a mountains near Safad. The last traces of these Hafizi communities are lost towards the end of the Mamluk period.

Yemen

Soon after the split, the Zurayid ruler Saba ibn  Abu'l-Su'ud declared himself as the Hafizi dāʿī in Yemen, thus becoming the head of the Hafizi community there. By the time of his death in 1138, he had eliminated the rival branches of his family and established his rule over the city and hinterland of Aden. His successors were officially recognized as dāʿīs by Cairo and invested with honorific titles by al-Hafiz. The Zurayid dynasty lasted until the Ayyubid invasion of 1173. The last members of the clan held out in the fortress of Dumluwa until 1188, but they finally sold it to the Ayyubids and left Yemen for Abyssinia. 

Further north, Hafizi Isma'ilism was also adopted by some of the Hamdanids of Sana'a. Himas ibn al-Qubayb and his son Hatim were the first Hamdanid rulers to declare for the Hafiziyya. After Hatim ibn Himas' death in 1138, the dynasty collapsed in internal feuds, but was reunited by Hatim ibn Ahmad ibn Imran and his son Ali. Both engaged in warfare with the Zaydi imamate of Saada, while Ali also attacked the Tayyibis under Hatim ibn Ibrahim al-Hamidi in 1166–1169, pushing them out from Shibam Kawkaban into Haraz. In 1173, Ali assisted the Zurayids in defeating the Kharijite ruler of Zabid, Abd al-Nabi. Soon after his return, he confronted the Ayyubid invasion of Yemen. He lost Sana'a in 1174, but soon recovered it and held it until 1189. Ali and his brothers continued to contest control over the northern part of the country around Sana'a until the early 13th century.

The slow and gradual Ayyubid conquest allowed Hafizi Isma'ilism to survive for some time in Yemen, as related by Ali's grandson, Badr al-Din Muhammad Ibn Hatim, who died . For a while it remained prominent enough that the fifth leader of the Yemeni Tayyibis, Ali ibn Muhammad ibn al-Walid (died 1215), composed a treatise attacking them and their doctrines. Unlike the Tayyibis, the Yemeni Hafizis apparently did not extend their activities to India.

List of Hafizi imams
 Hasan ibn Ali (661–669) 
 Husayn ibn Ali (669–680)    
 Ali ibn Husayn Zayn al-Abidin (680–713)
 Muhammad al-Baqir (713–733)  
 Ja'far al-Sadiq (733–765) 
 Isma'il ibn Ja'far (765–775) 
 Muhammad ibn Isma'il (775–813)
 Abadullah ibn Muhammad (Ahmad al-Wafi), died 829, Da'i and "hidden Imam", son of Muhammad ibn Isma'il according to Fatimid Isma'ili tradition
 Ahmad ibn Abadullah (Muhammad at-Taqi), died 840, Da'i and "hidden Imam"
 Husayn ibn Ahmad (Radi Abdullah), died 909, Da'i and "hidden Iman"
 Abdallah al-Mahdi Billah, died 934, Da'i who openly declared himself as Imam, 1st Fatimid Caliph
 Al-Qa'im bi-Amr Allah, died 946, 2nd Fatimid Caliph
 Al-Mansur bi-Nasr Allah, died 953, 3rd Fatimid Caliph
 Al-Mu'izz li-Din Allah, died 975, 4th Fatimid Caliph
 Al-Aziz Billah, died 996, 5th Fatimid Caliph
 Al-Hakim bi-Amr Allah, 6th Fatimid Caliph, disappeared 1021
 Al-Zahir li-i'zaz Din Allah, died 1036, 7th Fatimid Caliph
 Al-Mustansir Billah, died 1094, 8th Fatimid Caliph
 Al-Musta'li Billah, died 1101, 9th Fatimid Caliph, son of Al-Mustansir Billah
 Al-Amir bi-Ahkam Allah, died 1130, 10th Fatimid Caliph
 Al-Hafiz li-Din Allah, died 1149, 11th Fatimid Caliph
 Al-Zafir bi-Amr Allah, died 1154, 12th Fatimid Caliph
 Al-Fa'iz bi-Nasr Allah, died 1160, 13th Fatimid Caliph
 Al-Adid li-Din Allah, died 1171, 14th and last Fatimid Caliph; at his death, Saladin abolished the Fatimid regime
 Dawud al-Hamid li-'llah, died in prison under the Ayyubid dynasty in 1208
 Sulayman Badr al-Din, died in prison under the Ayyubid dynasty in 1248, without issue, ending the line of Hafizi imams

See also
List of extinct Shia sects

References

Sources
 
 
 
 

 
Islam in the Fatimid Caliphate
Egypt under the Fatimid Caliphate
Islamic history of Yemen