The Ibn Talun Mosque was commissioned by the Abbassid governor of Egypt from 868-884 CE, after whom it is named. It's constructed in a Samarran style, drawing inspiration from the capital of the Abbasid dynasty at the time before it was relocated to Baghdad. One of the distinguishing features of this architectural style is the spiral design of the minaret although interestingly, there is some contention over the Ibn Talun minaret, which some believe was constructed at a later date. 1296 is one historian's estimation. It would not be surprising; the mosque like many others in Cairo has been restored several times with new features added on each occasion.
The first of the restorations was in 1177 and was undertaken by Badr al-Jamali, a warlord from Armenia who rose to prominence in the service of the Fatimid caliphate, eventually becoming wazir. The man who took care of the shoe rack by the mosque's entrance showed me the inscription that Al-Jamali added to the mosque. It's an important piece of history. According to patachu.com, the Fatimid caliphs claimed the divine right to rule based on their direct lineage from Fatima, the daughter of the Prophet Muhammad, and the propagation of Fatimid Shi'a Islam as an ideology was vital in maintaining this legitimacy. Al-Jamali's rise to power saw the beginning of a trend in Egyptian history where the Fatimid caliphs became puppets of their wazir commanders, figureheads for the military generals to rule from behind.
When he commissioned the restoration of the Mosque of Ibn Talun, Badr al-Jamali had a slab installed carrying an inscription of the Shahada, the Muslim declaration of faith. It reads, “There is no god but God, Muhammad is the messenger of God.” It then then continues, “wa 'Aliyyun waliyyu l-Lāh” - “and Ali is the wali (friend or vice-regent) of God.” This second part is an article of faith particular to Shi'i Islam. By installing this inscription, Al-Jamali was seeking to support the existing political order which he would later use as a mask for his own rule. I had my photo taken next to it.
A man with a gun is shouting at me to leave because it's closing time for non-Muslims,
but the guy from the shoe rack keeps saying, "Just one more. I think I've got it this time!"