 Later the mosque was expanded by the Fatimid Caliph Al-Hakim bi-Amr Allah and named as "Al-Maqs Mosque".According to the map of Al-Maqrizi, the name was a reference to the nearby castle existed back then on the island at the Nile, known as Qal'at Al-Maqs.The mosque was also called as Jami Bab al-Bahr.