 Although the Caliphate was saved from immediate destruction, the decade long rebellion devastated Egypt and it was never able to regain much power.As a result, Badr al-Jamali was also made the vizier of the Fatimid caliph, becoming one of the first military viziers ("Amir al Juyush", , Commander of Forces of the Fatimids) who would dominate late Fatimid politics.Al-Jam`e Al-Juyushi (, The Mosque of the Armies), or Juyushi Mosque, was built by Badr al-Jamali.