# Al-Afdal Shahanshah

Al-Afdal Shahanshah (Arabic: الأفضل شاهنشاه, romanized: al-Afḍal Shāhanshāh; Latin: Lavendalius/Elafdalio; 1066 – 11 December 1121), born Abu al-Qasim Shahanshah bin Badr al-Jamali, was a vizier of the Fatimid caliphs of Egypt. According to a later biographical encyclopedia, he was surnamed al-Malik al-Afdal ("the excellent king"), but this is not supported by contemporary sources.

## Ascent to power

He was born in Acre, the son of Badr al-Jamali, an Armenian mamluk who became Muslim. Badr was vizier for the Fatimids in Cairo from 1074 until his death in 1094, when al-Afdal succeeded him. Caliph Al-Mustansir Billah died soon afterwards, and al-Afdal appointed as caliph al-Musta'li, a child, instead of al-Mustali's much older brother Nizar ibn al-Mustansir. Nizar revolted and was defeated in 1095; which led to tension between Al-Afdal and Nizar’s supporters, mainly Hassan-i Sabbah, and his Nizari Isma'ili group known also as the order of Assassins.
At this time Fatimid power in Palestine had been reduced by the arrival of the Seljuk Turks. In 1097 he captured Tyre from the Seljuks, and in 1098 he took Jerusalem, expelling its Artuqid governor Ilghazi and installing in his place the Fatimid official Iftikhar al-Dawla. Al-Afdal restored most of Palestine to Fatimid control, at least temporarily.
Under al-Afdal, the caliphs were confined in their palace, away from public view, and even bereft of their ceremonial functions, which al-Afdal arrogated to himself. The vizier even moved the setting for most public ceremonies and the celebration of festivals away from the caliphal palace to his own palace, the Dar al-Mulk, which he built in 1106–1108 outside the city walls of Cairo. Built on the shore of the Nile outside the city walls of Cairo, the large vizieral palace of Dar-al-Mulk has since disappeared without a trace.

## Conflict with the Crusaders

Al-Afdal misunderstood the Crusaders as Byzantine mercenaries; this misperception caused al-Afdal to conclude that the Crusaders would make for natural allies, as each were enemies of the Seljuk Turks. Fatimid overtures for an alliance with the crusaders were rebuffed, and the crusaders continued southward from Antioch to capture Jerusalem from Fatimid control in 1099.
When it became apparent that the Crusaders would not rest until they had control of the city, al-Afdal marched out from Cairo, but was too late to rescue Jerusalem, which fell on 15 July 1099. On 12 August 1099, the Crusaders under Godfrey of Bouillon surprised al-Afdal at the Battle of Ascalon and completely defeated him. Al-Afdal would later reassert Fatimid control of Ascalon, as the Crusaders did not attempt to retain it, and utilize it as a staging ground for later attacks on the Crusader states.
When al-Musta'li died in December 1101, al-Afdal raised the five-year-old al-Amir bi-Ahkam Allah to the throne as imam and caliph. To further strengthen the familial ties with the young caliph, he married him to his own daughter. As the vizier, father-in-law, and uncle of the young ruler, al-Afdal placed the caliph before him on his own horse during al-Amir's inaugural procession. A decree, dictated by al-Afdal, renewed his appointment as vizier with plenipotentiary powers and ensured his ascendancy over the child-caliph.
Al-Afdal marched out every year to attack the nascent Kingdom of Jerusalem, and in 1105 attempted to ally with Damascus against them, but was defeated at the Third Battle of Ramla. Al-Afdal and his army enjoyed success only so long as no European fleet interfered, but they gradually lost control of their coastal strongholds; in 1109 Tripoli was lost, despite the fleet and supplies sent by al-Afdal, and the city became the centre of the Crusader state of the County of Tripoli. In 1110 the governor of Ascalon, Shams al-Khilafa, rebelled against al-Afdal with the intent of handing over the city to Jerusalem (for a large price). Al-Khilafa was assassinated by his Berber troops, sending his head to al-Afdal.
Al-Afdal also introduced tax (iqta') reform in Egypt, which remained in place until Saladin took over Egypt. Al-Afdal was nicknamed Jalal al-Islam ("Glory of Islam") and Nasir al-Din ("Protector of the Faith"). Ibn al-Qalanisi describes him as "a firm believer in the doctrines of Sunnah, upright in conduct, a lover of justice towards both troops and civil population, judicious in counsel and plan, ambitious and resolute, of penetrating knowledge and exquisite tact, of generous nature, accurate in his intuitions, and possessing a sense of justice which preserved him from wrongdoing and led him to shun all tyrannical methods."

## Final years and assassination

In 1115, an assassin tried to kill al-Afdal, but he was saved by his bodyguards. While he was not harmed, his health deteriorated from that time, leading to assigning his brother Ja'far the task of adding the official, calligraphic signature to documents, while in 1115, he designated his son, Sama' al-Mulk Husayn, as his deputy (and thus heir-apparent). Following another failed attack by three assassins in 1118, al-Afdal suspected his own sons, and had them deprived of their positions and incomes.
On 13 December 1121, during a procession on the last day of Ramadan, al-Afdal was assassinated. The deed was commonly attributed to (and claimed by) the Nizari Order of Assassins. However, the contemporary Syrian chronicler Ibn al-Qalanisi states that the murder was the work of the Caliph al-Amir, and of al-Afdal's chief of staff, al-Ma'mun al-Bata'ihi, who would succeed him as vizier. Modern scholars commonly accept the Assassins' responsibility for the deed, apparently as revenge for Nizar's death, but whatever his true role in his master's death, al-Bata'ihi moved quickly to take control of the situation. He took his master's body to the vizieral palace and delayed the announcement of his death until al-Amir could be notified. On the morning of the next day, Eid al-Fitr, al-Amir appointed al-Bata'ihi as vizier and publicly reasserted his position as head of the state by presiding at the day's ceremony. Al-Afdal's adult sons were imprisoned, but the other members of al-Afdal's family, to whom after all the caliph himself was related, were allowed to partake in the ceremony, and al-Afdal received a funeral and burial appropriate to his station. At the same time, al-Amir moved quickly to confiscate al-Afdal's enormous wealth, houses, and estates, and brought the moveable items to his own palace. So great was the treasure amassed by al-Afdal that chroniclers describe it as larger than that of any previous king, and it took forty days to move it to the caliph's palace.

## Buildings

Little survives today of the buildings commissioned by al-Afdal during his long regency. The only known mosque commissioned by al-Afdal was the Mosque of the Elephant, built c. 1105 south of Fustat (Old Cairo), on a hill above the Lake of the Abyssinians (Birkat al-Habash). It was the site of the first, failed attempt to build a new observatory in 1119, before it was realised that the site was unsuitable. Some reports indicate that al-Afdal also rebuilt the mosque at Gizeh, which had been destroyed by the Nile floods, but this cannot be corroborated. Al-Afdal did also erect new minarets, including at the Mosque of Amr, but these do not survive. The large vizieral palace (Dar-al-Mulk) that was built on the shore of the Nile, outside the city walls of Cairo, has also disappeared without a trace. The only surviving piece of work is the mihrab of the Mosque of Ibn Tulun, commissioned during the first months of his rule.