Al-Amir bi-Ahkam Allah

Abu Ali al-Mansur ibn al-Musta'li (; 31 December 1096 – 7 October 1130), better known by his regnal name al-Amir bi-Ahkam Allah () was the tenth Fatimid Caliph, and the 20th Imam of Musta'li Isma'ili sect of Shia Islam, from 1101 to his death in 1130. Until 1121, he was a "de facto" puppet ruler of his uncle and father-in-law, the vizier al-Afdal Shahanshah. When the latter was murdered, possibly with al-Amir's connivance, the caliph appointed al-Ma'mun al-Bata'ihi as vizier, but took an increasing role in government, and after 1125 ruled without a vizier. His reign saw the progressive loss of all Fatimid strongholds in Palestine to the Crusaders apart from Ascalon. His assassination in 1130, leaving only his infant son al-Tayyib as heir, threw the Fatimid regime into a succession struggle during which it almost collapsed. Fatimid rule was restored with the succession of al-Amir's cousin al-Hafiz li-Din Allah in 1132, which led to the division of Musta'li Isma'ilism into the rival Hafizi and Tayyibi branches.
Life.
Reign under al-Afdal's tutelage.
The future al-Amir was born on 31 December 1096 to the ninth Fatimid imam-caliph, al-Musta'li (). In December 1101, his father died, and at the age of five he was proclaimed caliph by the all-powerful vizier, al-Afdal Shahanshah, who was the "de facto" ruler of the Fatimid state. Al-Afdal was al-Amir's maternal uncle, and further strengthened the familial ties with the young caliph by marrying him to his own daughter. A decree, dictated by al-Afdal, renewed his appointment as vizier with plenipotentiary powers and ensured his ascendancy over the child-caliph. The first twenty years of al-Amir's reign were thus dominated by al-Afdal, who controlled government and restricted al-Amir to a few ceremonial duties. 
During this period, the main preoccupation of the Fatimid state was the conflict with the Crusaders of the Kingdom of Jerusalem. This holy war also served as the main legitimization device for al-Afdal's rule and for the dynasty itself: as the historian Michael Brett writes, following the territorial losses and Nizari schism of the previous decade, that had weakened both the Fatimid state (the ) and the Fatimid Isma'ili mission (the ), the struggle against the Crusaders "had given the dynasty fresh purpose". Despite al-Afdal's continuous campaigns, however, most of Palestine was lost to the Crusaders, along with the coastal cities of Tartus (1102), Acre (1103), Tripoli (1109), and Sidon (1111). Egypt itself was briefly invaded by King Baldwin I of Jerusalem in 1117. The Fatimids largely fell back on the coastal city of Ascalon, which developed into a major fortress and outpost () of the holy war: for the next half-century it was to remain a centre for raids against the Crusader territories, and a guard of the route from Palestine into Egypt. Medieval Muslim historians often blame al-Amir for these disasters, but in reality he played no role in the Fatimid government during those years.
Vizierate of al-Ma'mun al-Bata'ihi.
Al-Afdal's tutelage ended with his assassination at the hands of Nizari agents in December 1121. Given his own resentment at the subordinate figurehead role in which al-Afdal had relegated him, al-Amir is often suspected of having been complicit in the act. While engaging in a public display of grief for his vizier's death, al-Amir moved quickly to imprison al-Afdal's sons and confiscate al-Afdal's enormous wealth, houses, and estates, while the moveable items were brought to his own palace. So great was the treasure amassed by al-Afdal that it was considered to have been larger than that of any previous king; it took forty days to move it. 
As he had been left out of government and was unfamiliar with its intricacies, al-Amir selected al-Afdal's long-time chief of staff, al-Ma'mun al-Bata'ihi, as vizier. Al-Ma'mun was a capable administrator, but his position was much weaker vis-à-vis the caliph than his old master's: al-Amir resumed many of the old caliphal functions that al-Afdal had arrogated to himself, and he henceforth had a voice in government. As ruler, al-Amir is portrayed in the sources as "unusually intelligent and knowledgeable", and was said to have memorized the Quran.
In the aftermath of the assassination of al-Afdal, the threat of the Nizaris, who were implacably hostile to the rule of al-Amir and his father, was a major concern of the government, in view of the widespread network of agents they had established. In December 1122 al-Amir convened a meeting of officials in Cairo in which the Nizari claims to the imamate were publicly denounced, and the legitimacy of the Musta'li claims affirmed. A proclamation to that effect, the , was issued on this occasion and has been preserved to the present day. Al-Amir also paid attention to court the remaining pro-Fatimid Musta'li communities abroad, especially in Yemen, where he sent rich gifts to the Sulayhid queen Arwa al-Sulayhi in 1123. In the same year, the Zirid emir of Ifriqiya, Abu'l-Hasan al-Hasan ibn Ali, also sent envoys to Cairo to announce his return to recognizing Fatimid suzerainty, and sought Fatimid assistance in repelling a possible Norman invasion. 
In 1123, the Luwata Berbers invaded Egypt and reached as far as Alexandria, before they were driven back by al-Ma'mun. The war against the Crusaders continued with the loss of Tyre in 1124.
Personal rule.
By 1125, al-Amir began to resent al-Ma'mun's attempts to restrict his authority, and in October 1125 had him, his brother, and his chief aides arrested. They were executed in 1128. Instead of appointing a new vizier, al-Amir now ruled in person, relying on the heads of the various administrative departments for governance. One of them, the Christian Abu Najah ibn Fanna, quickly rose to prominence due to his ability to provide the caliph with money through confiscations from Christians, Jews, and eventually Muslims as well. His ascendancy lasted for three years before he was denounced, arrested, and executed. Having ignored the matter for so long, al-Amir's own reputation was left tarnished from the affair, as well as from his extravagance and profligacy: it is said that the palace consumed 5,000 sheep per month, and the rich gifts he made to his favourites were remarked upon. 
In February/March 1130, al-Amir finally had a son, who was named al-Tayyib. His birth was celebrated with public festivals, and letters were sent abroad announcing his birth as the designated successor. 
Murder and aftermath.
On 7 October 1130, al-Amir was assassinated by Nizari agents. He left only his six-month-old son, al-Tayyib, to succeed him, with no designated regent or serving vizier. Al-Amir's murder not only undid his attempts to once again concentrate power in the caliph's hands instead of over-mighty generals and ministers, but also, given the fragility of succession, endangered the very survival of the Fatimid dynasty. 
Al-Tayyib was quickly sidelined, and his fate is unknown; it is unclear whether he died in infancy or was killed. A new regime installed under the regency of al-Amir's cousin, Abd al-Majid, which at first claimed to rule in the name of an unborn son by one of al-Amir's concubines. Within a fortnight, an army mutiny brought al-Afdal's last surviving son, Kutayfat, to power. Kutayfat abolished the Fatimid imamate and imprisoned Abd al-Majid, but was himself assassinated by Fatimid loyalists in December 1131. With no other heir available, Abd al-Majid took over as imam and caliph with the regnal name al-Hafiz li-Din Allah in January 1132, proclaiming that he had secretly received the designation by al-Amir before he had died. 
Al-Hafiz' succession broke a continuous line of father-to-son succession of ten generations, something extremely rare in the Islamic world and much remarked upon by medieval authors. Al-Hafiz' accession thus represented an unprecedented departure from the accepted norm, and caused yet another schism in Isma'ilism, as the Musta'li sect was divided into those who accepted al-Hafiz' succession (the "Hafizis") and those who did not, upholding instead the imamate of the vanished al-Tayyib (the "Tayyibis"). The former were mostly concentrated in the Fatimid-controlled territories in Egypt, Nubia, and the Levant, while the latter in the Yemen, where Queen Arwa took up a leading role in forming a separate Tayyibi "daʿwa".