The imperial cities of Morocco are Fes, Marrakech, Meknes and Rabat. Each one served as a royal capital for a ruling dynasty. Each still has the walls, gates, palaces and old medina to prove it. This guide to the imperial cities of Morocco covers the history of each city, what to see there, and how to visit all four on one route.
What are the imperial cities of Morocco?
Over twelve centuries, Morocco moved its capital many times. Each new dynasty chose a city, built a palace and walls, and filled it with mosques and schools. Four cities held that role long enough to earn the name: Fes, Marrakech, Meknes and Rabat. According to Wikipedia, Rabat has been the capital since independence in 1956.
Today, all four imperial cities of Morocco are on the UNESCO World Heritage List, as the list of World Heritage Sites in Morocco shows. The Medina of Fez joined in 1981 and the Medina of Marrakesh in 1985. The Historic City of Meknes followed in 1996, and Rabat in 2012. Each city has its own personality, so seeing them together tells the whole story of Morocco.
Fes: the oldest of the imperial cities of Morocco
Fes was built between 789 and 808 by Idris I and his son Idris II, the founders of the first Moroccan dynasty. It was the capital of the Idrisids, and later of the Marinids from 1244 to 1465. The Alawite sultans also ruled from Fes, on and off, until 1912. Its old medina, Fes el Bali, has kept much of its medieval layout.
Cars cannot enter the narrow lanes of Fes el Bali, so donkeys and handcarts still carry goods. Inside the medina stands al-Qarawiyyin, founded in the 850s by Fatima al-Fihri. Guinness World Records calls it the oldest existing, and continually operating educational institution in the world. Nearby, the Chouara tannery still dyes leather in open stone vats.


Plan at least one full day in Fes with a local guide, because the medina is a real maze. Read our full guide to Fes, Morocco and our comparison of Fes vs Marrakech.
Marrakech: the Red City among the imperial cities
Marrakech was founded around 1070 by the Almoravids, Amazigh rulers from the Sahara. The city gave its name to the whole country. It was the capital of the Almoravids and the Almohads, and later of the Saadians. Its red earth walls give it the nickname the Red City.
The Koutoubia Mosque is the main landmark of the city. The Almohad caliph Abd al-Mu’min rebuilt it around 1158, and its minaret rises 77 m. Next to it, Jemaa el-Fna square fills with musicians, storytellers and food stalls every evening. Do not miss the ruins of El Badi Palace and the carved courtyard of the Ben Youssef Madrasa.



Marrakech is also the best base for the Atlas Mountains and the Sahara. See is Marrakech worth visiting for our honest view.
Meknes: the quiet imperial city of Moulay Ismail
Meknes became a capital in 1672, when Sultan Moulay Ismail chose it as his royal city. He ruled for 55 years, until 1727. He built on a huge scale: palaces, city walls with twenty gates, the giant Heri es-Souani granary and the Agdal water basin.
The most famous monument is Bab Mansour, a monumental gate decorated with green zellige tiles and carved stone. It was finished in 1732 by his son, Moulay Abdallah. Meknes is calmer than Fes and Marrakech, so it is a pleasant place to walk. Read more in our guide to Meknes, Morocco.


Meknes is about 60 km from Fes, so it is an easy day trip from Fes. The Roman ruins of Volubilis are a short drive away and fit in the same day. They have been a UNESCO site since 1997. See our Volubilis and Moulay Idriss day trip.
Rabat: the modern capital of the imperial cities of Morocco
Rabat is the capital of Morocco today, but the city we know began in the 12th century. The Almohad caliph Yaqub al-Mansur wanted to make it his capital and began a giant mosque in 1191. When he died in 1199, the work stopped. The Hassan Tower, the minaret of that mosque, stands unfinished at 44 m, surrounded by rows of stone columns.
Facing the tower is the Mausoleum of Mohammed V. Above the river mouth, the Kasbah of the Udayas has white and blue lanes with ocean views. Rabat is clean, green and easy to explore, and its medina is small and relaxed. Read our full guide to Rabat, Morocco.


How to visit all the imperial cities of Morocco in one trip
The four cities sit on a natural route. Many travelers fly into Casablanca, visit the Hassan II Mosque, then drive north to Rabat. From Rabat, the road goes inland to Meknes and Volubilis, then on to Fes. From Fes, you can cross the Middle Atlas to the Sahara and end in Marrakech.
- Day 1: Casablanca to Rabat
- Day 2: Rabat to Fes via Meknes and Volubilis
- Day 3: A full guided day in Fes
- Days 4 to 6: Fes to the Sahara, then over the High Atlas
- Day 7: A guided day in Marrakech
This is the plan of our 7 day imperial cities and Sahara tour. Short on time? Our 6 day imperial cities tour from Casablanca follows the same route in one day less.
Why visit the imperial cities of Morocco with a local guide?
Each medina has hidden courtyards, family workshops and small mosques that are easy to miss on your own. A guide explains the history behind each gate and palace. In Fes, a guide also keeps you from getting lost. On a private tour, your driver handles the roads between the imperial cities of Morocco. Read how booking works or learn about what a kasbah is before you go.
FAQ: imperial cities of Morocco
What are the four imperial cities of Morocco?
Fes, Marrakech, Meknes and Rabat. Each one was a royal capital of a Moroccan dynasty.
Which is the oldest imperial city in Morocco?
Fes is the oldest of the imperial cities of Morocco. It was built between 789 and 808 by Idris I and Idris II.
Is Casablanca an imperial city?
No. Casablanca is the largest city in Morocco, but it was never a royal capital. Many imperial cities tours start there because of its airport.
How many days do you need to see the imperial cities?
Plan at least four or five days for the four cities alone. Add two or three days if you want to include the Sahara on the way from Fes to Marrakech.
Which imperial city should I visit if I only have time for one?
Choose Fes for history and the old medina. Choose Marrakech for energy, food and easy trips to the mountains and desert.
Want to see all four imperial cities of Morocco with a private driver and local guides? Send us your dates.
Message us on WhatsApp
