Abū Muḥammad ʿAbd Allāh ibn Yūsuf ibn al-Ḥāfiẓ, better known by his regnal nameal-ʿĀḍid li-Dīn Allāh, also known as al-Azid and al-Athid, was the fourteenth and last caliph of the Fatimid dynasty, reigning from 1160 to 1171. Al-ʿĀḍid became a minority caliph on the death of his cousin Al-Fa'iz bi-Nasr Allah, who also had been a minority caliph. The de facto ruler of the time was the vizier, Tala'i ibn Ruzzik, who had taken to himself the honorific titleal-Malik, or "King". Ibn Ruzzik, a Twelver Shi'a, had further consolidated his position by forcing the young Al-ʿĀḍid to marry his daughter. Fatimid rule was so weak and divided by this time that the Crusaders were able to begin their invasions of Egypt. Al-Adid was the last Arab ruler in Egypt and Syria, and according to Michael Haag, "the once imperial Arabs were now governed by Turks and Kurds". Shawar, a former Fatimid governor of Upper Egypt, who, amid the empire's power struggle turned to Nur ad-Din Zangi, ruler of the Zengids in Syria, and was able to establish himself as vizier in Egypt, and he was the effective ruler of the land. Through careful seesaw diplomacy between Crusaders and Zengids, Shawar maintained a fragile grip on power. First, with the help of Syrian troops under Shirkuh and Saladin, Shawar's forces were able to fight off the Crusader incursions. A remarkable alliance was struck in 1167 between his caliphate and the Christian Kingdom of Jerusalem, against the Zengids. The crusader Arabic-speaking envoys, Hugh Grenier, a Knight Hospitaller, and Geoffrey Fulcher, a Knight Templar, arrived at his palace in Cairo, which was lavishly described by William of Tyre based on their impressions. Eventually, however, Shirkuh killed Shawar and took his place in 1169. After Shirkuh's death two months later, Shirkuh's nephew Saladin became vizier of Egypt. When al-Adid died of natural causes in 1171, the Fatimid dynasty ended to make way for the Ayyubids, a dynasty named for Saladin's father Ayyub. There were attempts to restore Fatimid rule in 1174/1175 with the help of Kanz ad-Dawla and Umara ibn Abi al-Hasan al-Yamani. A pretender claiming descent as Da'ud bin Sulayman bin Da'ud bin al-ʿĀḍid also attempted to restore Fatimid rule in the 13th century in Egypt with both attempts being defeated by the Ayyubids. Al-Adid was believed by the HafiziIsmailis to be the 25thImam and was succeeded by his son Daud surnamed Al-Hamid-lil-lah as Imam. The Hafizi sect continued with Daud Al-Hamid-lil-lah as 26th Imam who died in 1207/1208, in prison under the Ayyubids appointing his son Sulayman Badruddin as the 27th Imam, who died in 1248 also in prison under the Ayyubids. Sulayman Badrudddin died without issue in prison under the Ayyubids and the Hafizi IsmailiImamah bloodline died out. The Hafizi sect survived into the 13th and 14th centuries with adherents in Northern Egypt, Syria and Northern Yemen but had died out by the 15th century.