The Koutoubia Mosque, along with the Djema al-Fna Square, is the main shrine and symbol of the city of Marrakech. Construction of the mosque began in 1158 during the reign of Sultan Abd al-Mumin and was completed in 1190 when his grandson, Sultan Yacoubé al-Mansouré, came to power. The Qutubiya was erected on the site of an ancient mosque of the 11th century.
According to legend, the Emir ordered the erection of a mosque designed by his court architect. After the construction was completed, it turned out that the temple was incorrectly orientated to the most important Arabian shrine - Mecca. As a result, the enraged Emir executed the architect, destroyed the mosque and ordered a new one to be built in its place. The mosque is built of shale sandstone, which was quarried in the quarries of Jebel Geliz.
Koutoubia Mosque is one of the largest mosques in Africa. It can accommodate about 20,000 people at a time. After its construction, the temple fulfilled several functions - it was used as a library, a university and a school.
Koutoubia harmoniously combines elements of Andalusian and Moroccan architecture. The building is covered with beautiful coloured stucco and was finished with brightly coloured painted mosaics. However, over time, all the decorations were removed. The mosque is crowned with five domes. Inside the mosque there are 17 aisles with arches made in the form of a horseshoe. The central aisle points visitors to the mihrab - a prayer niche turned towards Mecca. At the opposite end of the temple is an open courtyard that serves as a place for namaz.
Today, the Koutoubia Mosque rises 77 metres above Marrakech, being the highest compared to other religious buildings in the city. Due to its height and magnificent decoration, the mosque can be seen from afar. Adorned with four shining gilded balls, the minaret was built in the traditional Spanish-Moorish architectural style of sandstone slate in the shape of a tower with a 16-metre high lantern and a dome topped by a spire.
Non-Muslims are not allowed to enter the Koutoubia Mosque. But one can visit the lush garden that surrounds it on all sides.

