See also: History of Morocco and Morocco
Over the course of Morocco'<nowiki/>s history, there have been four Imperial Cities: an imperial city is defined as "a city that is the seat of the empire". The four imperial cities of Morocco are: Fez, Marrakesh, Meknes and Rabat. Morocco's current capital city is Rabat and has been since they gained their independence in 1956.
See also: History of Fez and Timeline of Fez
Fez was founded and built up from 789 to 808 by both Idris I<nowiki/>and Idris II. During Idris IâÂÂs reign the city mainly existed on the right side of the Oued Fes riverbank, after he [Idris I] passed and Idris II took control and expanded into the left side of the riverbank.
The town of Fez was the capital city several times:
Marrakesh, the first of the four imperial cities, is considered a symbol of Morocco and the power of the Almoravid and Almohad dynasties. It was founded in 1070/71 by Yusuf ibn Tashufin and became the capital for the two following centuries. In the 16th century Marrakesh was used by the 'Alawites as a military post.
Marrakesh was the capital city for:
See also: Meknes
Meknes was founded by the Zanatah tribe, a subgroup of the Meknassa Imazighen Berbers, in the 10th century. Originally named Meknassa al- Zaytun ("Meknes of the Olives"), Meknes was the capital city in 1673 under the rule of Mawlay Isma'il who built several mosques and palaces as well as fortifying the cities walls. .
See also: Rabat, History of Rabat.
Rabat was founded in the 12th century, by the Almohad caliph Yaqub al-Mansur with the aim of serving as his capital, but the project was abandoned after he died and Marrakesh remained the capital city.
In the 18th century, Rabat was designated an imperial city by the Alawi sultan Muhammad ibn Abdallah, who built the Dar al-Makhzen, although he did not designate any city as his capital, moving continually between Rabat, Fez and Marrakech.