Sultan Muhammad ibn Abdallah did not choose a capital for his reign but in practice he based himself in Marrakesh more than any other city. As a result, he carried a number of renovations and constructions within the royal citadel (the Kasbah and Dar al-Makhzen) of the city, including the restoration of the main Kasbah Mosque.[2] However, reportedly because his son Maymun wanted a mosque that was closer to the palace itself, he commissioned another mosque, the Barrima Mosque.[2]: 487 This mosque is located on the eastern edge of the Royal Palace grounds and the western edge of the old Mellah (Jewish quarter), near the city gate of the same name, Bab Berrima. The mosque acted as an official royal mosque much like the Lalla Aouda Mosque did for Moulay Isma'il's kasbah and palace in Meknes.[4][2]
Architecture
Compared to other Moroccan mosques, the Barrima Mosque's form and layout are unusual. Rather than a sahn, the mosque's large square courtyard (measuring 35 by 35 meters) was referred to as a mechouar (an official royal square).[4][2] Between this and the prayer hall was a vestibule alongside two waiting rooms for the sultan and government officials.[2] The prayer hall, measuring 15 by 25 metres, is smaller than the courtyard and does not follow the usual form of prayer halls in Moroccan mosques: instead of a hypostyle space with rows of arches, it is composed of a large square chamber covered by a cupola resting on 12 columns and of another rectangular space in front of the mihrab (niche symbolizing the direction of prayer).[2] The wooden ceilings of the prayer hall are the most beautifully decorated aspect of the mosque.[2] The mosque had three entrances, of which only the northern one was accessible to the common inhabitants outside the palace. The sultan had his own private entrance, accessible from the palace, which opened next to the mihrab inside the mosque.[2] Its minaret is merely a small tower which does not surpass the height of the nearby walls of the palace (possibly an intentional design to avoid providing a view into the restricted grounds of the palace).[4][2] The mosque was originally provided with an adjoining madrasa and an ablutions chamber (midha), but these were in ruins by the mid-20th century.[2]