[8] In any case, the Saadi sultan Moulay Abd Allah al-Ghalib (ruled 1557–1574) undertook extensive repairs and restorations in the wake of the explosion, with the southern part of the mosque having possibly been the most damaged.
[8][9] A more recent study by Íñigo Almela Legorburu argues that the Saadian reconstruction likely enacted some significant changes to the mosque's internal configuration, resulting in its current layout.
[8] Later, the Alaouite sultan Sidi Muhammad Ibn Abd Allah (ruled 1757–1790) undertook another round of extensive restorations during the second half of the 18th century.
[3][8] On August 16, 1907, days after the French bombardment of Casablanca and invasion of the Shawiya plains, a group led by Madani El Glawi [ar] gathered at the mosque to pledge allegiance to Abdelhafid as their sultan over his brother Abdelaziz in the Hafidiya.
These facades feature a wide interlacing sebka pattern (a common Maghrebi motif that roughly resembles palmettes or fleur-de-lys) sculpted in brick and filled-in with green faience.
[7] This type of alternation was repeated in other contemporary and later minarets (e.g. the Hassan Tower in Rabat or the Chrabliyine Mosque in Fes).
[12]: 242–246 [13] Towards the top, a large frieze of green and white geometric mosaic tiles wraps around the minaret, before finishing in a crown of merlons.
This frieze did not survive but fragments of it have been found, while the rest of the tile mosaics on the minaret needed to be restored in recent times.
The fragments which have been preserved (in a collection kept at the nearby Badi Palace) represent the earliest surviving example of cuerda seca tilework (a technique originating in al-Andalus) being used in an architectural context.
[14]: 329–333 Above this main part of the minaret, the short lantern or secondary shaft on top makes use of similar decoration.
A once widely reported belief alleged that they were actually made of pure gold; a legend which originated with this mosque but which latter became associated with the Koutoubia minaret.
The space between each pair of auxiliary courtyards is taken up by a narrow roofed aisle as well – essentially projections of the surrounding gallery.
A recent study by Íñigo Almela Legorburu hypothesized that the mosque's current configuration with five courtyards is a result of the Saadian-era repairs in the 16th century.
[8] Six of the capitals, topping the columns furthest from the mihrab arch, are made of either stucco or stone and were carved in the Almohad period.
The six capitals inside or closest to the mihrab are carved in white marble and are spolia from the Umayyad period of al-Andalus, most likely brought here during the Almohad construction.
[12]: 178–180 On either side of the mihrab are two doors giving access to small chambers, one of which was used to store the wooden minbar (a ceremonial pulpit).
Above and right in front of the mihrab is a large square cupola filled with a dome of finely-carved and painted muqarnas (stalactite or honeycomb-like geometric sculpture).
It was quite likely made by Andalucian craftsman too, or by Moroccan craftsmen following in the same tradition, and was commissioned by Yaqub al-Mansur, who likely wished to emulate the earlier Almoravid minbar.
The spaces between these bands form other geometric shapes which are filled with wood panels of intricately carved arabesques.