This funeral mosque was built by Sultan Abu Hammu Moussa II in 1363-4/765 AH. It bears the name of the holy man Sidi Brahim al-Masmoudi who was buried near the monument in 1401/804 AH. Subsequently, the area around the mosque served as a royal cemetery by the Zayyanid dynasty.
The plan of this mosque is similar to those of
Sid El Haloui and
Sidi Bu Medyan. The prayer hall is divided into five naves perpendicular to the qibla wall. However, the mosque of Sidi Brahim is much more sober in terms of decoration, which is limited to the mihrab and the dome that precedes it.
The courtyard arches collapsed in 1993 requiring massive restorations that lasted until 2003, when the mosque was reopened to the public.