Both Caliph al-Aziz Billah and Caliph Al-Hakim bi-Amr Allah added to its premises. It was further repaired, renovated and extended by al-Mustansir Billah and al-Hafiz li-Din Allah. The Fatimid caliphs always encouraged scholars and jurists to have their study-circles and gatherings in this mosque and thus it was turned into a madrasa which has the claim to be considered as the oldest such institution still functioning.[11]