al-Mustansir Billah

States People Centers Other Abū Tamīm Maʿad al-Mustanṣir biʾllāh (Arabic: أبو تميم معد المستنصر بالله‎; 2 July 1029 – 29 December 1094)[b] was the eighth Fatimid Caliph from 1036 until 1094.

However, the break out of court infighting between the Turkish and Berber/Sudanese court factions following al-Yazuri's assassination, coinciding with natural disasters in Egypt and the gradual loss of administrative control over Fatimid possessions outside of Egypt, almost resulted in the total collapse of the Fatimid state in the 1060s, before the appointment of the Armenian general Badr al-Jamali, who assumed power as vizier in 1073, and became the de facto dictator of the country under the nominal rule of al-Mustansir.

[1] Al-Mustansir was considered incapable[citation needed] and as such his court was dominated by military strongmen and his mother's favourite officials, while the treasury was exhausted by factional infighting.

Atop the mihrab, his name is engraved along with the Shahada commonly recited by the public in the Fatimid era ending with the phrase 'Ali-un-Wali-ul-lah', meaning "Ali is the friend of God".

Concurrently, the Turkish mercenaries had drained the treasury; many of the works of art and valuables of all sorts in the palace were sold to satisfy their demands---often they themselves were the purchasers, at merely nominal prices, and resold the articles thus gained at a profit.

When he reached the palace, he found al-Mustansir lodged in rooms which had been stripped bare, waited on by only three slaves, and subsisting on two loaves which were sent him daily by the daughters of Ibn Babshand, the grammarian.

The victorious Turks dominated Cairo, held the successive viziers in subjection, treated al-Mustansir with contempt, and used their power to deplete the treasury by enhancing their pay to nearly twenty times its former figure.

Using the genealogical information of the members of the Fatimid dynasty imprisoned by Saladin, and contemporary documents, the historian Paul E. Walker estimates that al-Mustansir had "at the minimum seventeen sons whose names we can recover".

The mihrab made in honour of al-Mustansir Billah in the Mosque of Ibn Tulun with the phrase ʿalī-un-walī-u-allāh at the end, Cairo .