Ben Salah Mosque

The Ben Salah Mosque or Ben Saleh Mosque (, ) is a 14th-century Marinid mosque in the historic medina of Marrakesh, Morocco. It is the only major surviving Marinid-era monument in Marrakesh and is notable for its fine minaret.
Historical background.
Details of the mosque's foundation and construction are not entirely clear. An inscription on the monument itself states that construction of the minaret began in August 1321. According to historian Ibn al-Muwaqqit, the construction of the mosque may have begun in 1318-1319. This chronology (i.e. construction in 1318-1321) is the most plausible and would mean that the mosque was built under the reign of Marinid Sultan Abu Sa'id Uthman (ruled 1310-1331), who also built some of the madrassas in Fez (e.g. the Madrassa al-'Attarin).
The mosque is named after a local saint, Muhammad ben Salah (or Ibn Salih) to whom it is dedicated and around whose tomb it was built. Little is recorded about this figure, however, other than that folklore claims he was a simple butcher with the gift of foresight.
A madrasa was built next to the mosque by the Alaouite sultan Moulay Rashid around 1669-1671. As of 2012, there were plans to convert the madrasa into a museum displaying religious objects from the city's heritage, such as "minbar"s and manuscripts.
Architecture.
Overall layout of the mosque.
Despite numerous repairs over the centuries, the mosque appears to have remained essentially unchanged. The interior features a rectangular courtyard, wide but not very deep, surrounded by arcades and centered around a small basin or fountain. Beyond the courtyard is the main space of the prayer hall, defined by two rows of arches forming nine aisles. The overall layout is that of the common "T"-type, which is to say that the aisle of arches leading to the mihrab (a niche symbolizing the direction of prayer) is wider than the other aisles besides it. The easternmost and westernmost aisles to the sides of the prayer hall are truncated and do not extend all the way north: a minor curiosity rarely seen in this type of mosque (except for another Marinid mosque in Chellah). 
The interior features little decoration except for the mihrab at the middle of the qibla wall (indicating the direction of prayer). Like many western North African mosques of the period, the direction of the qibla (and, by extension, the orientation of the entire mosque), is substantially different from that of the "modern" qibla; it faces south-south-east, whereas the modern qibla in Morocco is almost due east (towards Mecca). The mosque has three entrances, and the minaret is located on its western side. 
The tomb of Muhammad Ben Salah is located in the north-western corner of the mosque.
The minaret.
The minaret is the most notable element of the mosque and the most richly decorated. As with the Marinid architectural style in general, it is derived from Almohad forms which came to define Moroccan-Andalusian architecture. In particular, it appears to be modeled in part on the Almohad minaret of the Marrakesh's Kasbah Mosque. Its upper facades are covered in the "darj-wa-ktaf" or "sebka" pattern (resembling palmettes or fleur-de-lys shapes), with minor differences between the patterns on the north and south sides versus those on the east and west sides. The lower facades are dominated by large polylobed arch motifs. As with the Kasbah Mosque, all of these patterns are molded in brick on a background of turquoise-green faience tiles. (Unlike the Almohad minarets, however, there is no tile frieze near the top of the minaret.) Each facade is pierced by three windows with horsheshoe-shaped arches, their positions coordinated with the polylobed arch patterns around them. The top of the minaret, including its upper lantern, is rimmed with merlons typical of Moroccan architecture. 
This overall layout of decoration was repeated soon afterwards at the Chrabliyin Mosque in Fez, another Marinid construction from the same era, which makes the Ben Salah minaret an example of the transition between Almohad models and subsequent constructions that became typical in Morocco. An extremely similar, but smaller, minaret was also constructed for another mosque in Marrakesh, the Moulay el-Ksour Mosque (more commonly known as the Mosque of the Cat), probably around the same time as the Ben Salah Mosque.
Madrasa.
The madrasa, built by the Alaouite sultan Moulay Rashid, is located behind (east of) the mosque. The building is centered around a large square courtyard, surrounded by a two-story gallery leading to numerous rooms.