Marrakesh is considered a symbol of Morocco and the power of the Almoravid and Almohad dynasties. It was founded in 1071 and became the capital for the two following centuries.
The capital under the Alaouite sultan Ismail Ibn Sharif (r. 1672–1727), who built its walls and made it his capital. He rebuilt and expanded its old kasbah into a new monumental palace-city to the south of the old city.
Rabat
Founded by the Almohad caliph Yaqub al-Mansur with the aim to make it his capital, the project was abandoned after he died and Marrakech remained the capital city.
In the 18th century, Rabat was designated as an Imperial city by the Alaouite sultan Muhammad ibn Abdallah, who built the Dar al-Makhzan palace, although he did not designate any city as his capital, moving continually between Rabat, Fez and Marrakech.