Abu Mansur Nizar ibn al-Mustansir (; 1045–1095) was a Fatimid prince, and the oldest son of the eighth Fatimid caliph and eighteenth Isma'ili imam, al-Mustansir. When his father died in December 1094, the powerful vizier, al-Afdal Shahanshah, raised Nizar's younger brother al-Musta'li to the throne in Cairo, bypassing the claims of Nizar and other older sons of al-Mustansir. Nizar escaped Cairo, rebelled and seized Alexandria, where he reigned as caliph with the regnal name al-Mustafa li-Din Allah (). In late 1095 he was defeated and taken prisoner to Cairo, where he was executed by immurement.

During the 12th century, some of Nizar's actual or claimed descendants tried, without success, to seize the throne from the Fatimid caliphs. Many Isma'ilis, especially in Persia, rejected al-Musta'li's imamate and considered Nizar as the rightful imam. As a result, they split off from the Fatimid regime and founded the Nizari branch of Isma'ilism, with their own line of imams who claimed descent from Nizar. This line continues to this day in the person of the Aga Khan.

Nizar ibn al-Mustansir

Life

Nizar was born on 26September 1045 (5 Rabīʿ al-ʾAwwal 437 A.H.) to the ruling Fatimid imam–caliph, al-Mustansir (). At that time, al-Mustansir was around 15years old and had already been on the throne for ten years. Nizar was most likely the eldest son of the caliph, although another son named Abu Abdallah is sometimes listed as the senior of al-Mustansir's sons.

Nizar ibn al-Mustansir

In the late 1060s, the Fatimid Caliphate entered a profound crisis, with the advance of the Seljuk Turks from the east threatening its hold over Syria, and protracted clashes between the Fatimid army's Turkish and black African troops in Egypt leading to the breakdown of the central government and widespread famine and anarchy. In about1068, as internal turmoil threatened the dynasty with collapse, al-Mustansir dispersed his sons throughout his territories as a safeguard, keeping only an unnamed underage son close to him. The account by the Mamluk-era historian al-Maqrizi says that Abu Abdallah and Abu Ali were to go to Acre to join the army of the commander Badr al-Jamali; Abu'l-Qasim Muhammad (father of the Caliph al-Hafiz) to Ascalon; while another, unnamed but underage son, remained in Cairo. Nizar is not mentioned by al-Maqrizi, but he was very likely included in this measure, and the , a proclamation issued in 1122 by Caliph al-Amir (), claims that he was sent to the port of Damietta. This dispersal of the Fatimid princes lasted at least until Badr al-Jamali assumed power in 1073 as vizier and quasi-dictator and restored order in Egypt.

Nizar ibn al-Mustansir

Disputed succession

As the oldest son, Nizar was apparently considered to be his father's most likely successor, as was the custom; indeed, historians often state that Nizar had been his father's designated successor. However, no formal designation of Nizar as heir seems to have taken place by the time of al-Mustansir's death in December 1094.

Al-Maqrizi writes that this was due to the machinations of Badr's son al-Afdal Shahanshah, who had succeeded his father to the vizierate in June 1094. According to al-Maqrizi, a deep-seated enmity existed between al-Afdal and Nizar. An anecdote tells how al-Afdal had once tried to enter the palace on horseback—a privilege reserved for the caliph—whereupon Nizar yelled at him to dismount and called him a "dirty Armenian". Since then, the two had been bitter enemies, with al-Afdal obstructing Nizar's activities and demoting his servants, while at the same time winning the army's commanders over to his cause. Only one of them, the Berber Muhammad ibn Masal al-Lukki, is said to have remained loyal to Nizar, because he had promised to appoint him vizier instead of al-Afdal.

According to al-Maqrizi, al-Afdal pressured al-Mustansir to prevent Nizar's public nomination as heir, and when the caliph died, al-Afdal raised a much younger half-brother of Nizar, al-Musta'li, to the throne and the imamate. Al-Musta'li, who had shortly before married al-Afdal's sister, was completely dependent on al-Afdal for his accession. This made him a compliant figurehead who was unlikely to threaten al-Afdal's recent, and therefore as yet fragile, hold on power.