The largest mosque in Marrakech is the Koutoubia Mosque. It is located in the southwest medina quarter of Marrakesh about 200 metres west of the city’s Jemaa El Fna souq. Construction was completed during the reign of the Almohad Caliph Yaqub al-Mansur (1184–1199). It later inspired other buildings such as the Hassan Tower in Rabat.
The mosque is made of red stone and brick measuring 80 metres long and 60 metres wide. The minaret was designed to prevent any one at the top of the tower from peeking into the king’s harems. The minaret stands 77 metres high was originally covered in pink plaster but in the 1990s was removed to expose the original stone works.
When the Koutoubia mosque was built, the orientation facing Mecca was off by 5°. The solution was to build a second mosque, the present Koutoubia. The two mosques existed side by side, the first as a sort of annexe. As time passed by, the older structure fell into disrepair and eventual ruin.