The Juyushi Mosque was built by Badr al-Jamali, the Amir al Juyush (Commander of Forces) of the Fatimids. The mosque was completed in 1085 under the patronage of the then Caliph and Imam Ma'ad al-Mustansir Billah. It was built on an end of the Mokattam Hills which would ensure a view of the Cairo city.