Almohads
The Almohads were a Berber dynasty whose caliphate ruled the Maghreb from Marrakesh. The Marinids captured the city and killed the last caliph in 1269, ending Almohad rule before 1337.
Marrakesh lost its capital status to Fez under the Marinids. In the early 16th century it again became a capital under the Saadians; their sultan Ahmad al-Mansur began the El Badi Palace in 1578, using Italian marble for a setting to receive foreign ambassadors.