Four Moroccan cities have served as the capital of a ruling dynasty: Fes, Marrakech, Meknes and Rabat. Each was shaped by different sultans in a different century, and together they tell the story of the country. Here is what sets each one apart.
1. What is an imperial city?
Morocco has been ruled by a succession of dynasties since the 8th century, and each chose its own seat of power. The four cities that held that role are known as the imperial cities. All have a walled medina, a royal palace and monuments left by the rulers who built them.
2. The dynasties in brief
The story is easier to follow with the ruling families in order.
- Idrisids (late 8th to 10th century): Founded Fes and the first Moroccan state.
- Almoravids (11th to 12th century): Came from the Sahara and founded Marrakech.
- Almohads (12th to 13th century): Ruled from Marrakech and began a new capital at Rabat.
- Marinids (13th to 15th century): Returned the court to Fes and filled it with madrasas.
- Saadians (16th to 17th century): Made Marrakech splendid again.
- Alaouites (17th century to today): Moulay Ismail ruled from Meknes; the capital has been Rabat since 1912.
3. Fes: the spiritual capital
Founded at the end of the 8th century by the Idrisid dynasty, Fes is the oldest of the four and remains the country's centre of religion, learning and craft. Its medina is the largest in Morocco and home to the Al Quaraouiyine university, founded in 859.
The city is really two medinas side by side: Fes el-Bali, the original, and Fes el-Jdid, added by the Marinids in the 13th century to house their palace and army. No cars enter the old town, so everything from gas bottles to wedding furniture travels by mule or handcart. A guide for the first half-day is money well spent.
- Do not miss: the Bou Inania Madrasa, the Chouara tannery, Bab Boujloud and the view from the Marinid Tombs.
4. Marrakech: the red city
Marrakech was founded around 1070 by the Almoravids, who came from the Sahara, and it gave its name to the country. Later dynasties added the Koutoubia Mosque, the Saadian Tombs and the palaces of the 19th century. It is the most vibrant of the four.
The Almohads took the city in 1147 and built the Koutoubia, whose minaret became the model for the Hassan Tower in Rabat and the Giralda in Seville. Under the Saadians in the 16th century Marrakech was a capital again, enriched by the trans-Saharan trade in gold and sugar. Its ramparts of red earth still run for some 19 kilometres around the medina.
- Do not miss: Jemaa el-Fna, the Bahia Palace, the Ben Youssef Madrasa and the Majorelle Garden.
5. Meknes: the city of Moulay Ismail
Meknes became the capital in 1672 under Sultan Moulay Ismail, who spent more than fifty years building it into a city of monumental gates, vast stables and 40 kilometres of walls. It is the smallest and quietest of the imperial cities, and the least visited.
Moulay Ismail was a contemporary of Louis XIV, and Meknes is sometimes called the Versailles of Morocco. The scale is what impresses: granaries with walls several metres thick to keep grain cool, and a vast square, Place el-Hedim, facing the great gate. Some monuments are closed from time to time for restoration, so ask your guide what is open.
- Do not miss: Bab Mansour, the royal granaries and stables, the mausoleum of Moulay Ismail and nearby Volubilis.
6. Rabat: the modern capital
Rabat was first planned as a capital by the Almohads in the 12th century and has been the seat of government since 1912. It combines a clifftop kasbah, medieval ruins and wide modern boulevards.
The Almohad sultan Yacoub al-Mansour intended the Hassan Mosque to be the largest in the western Islamic world, but work stopped at his death in 1199. Today Rabat is the king's main residence and the greenest and calmest of the four cities, with a tram, wide avenues and an Atlantic seafront.
- Do not miss: the Hassan Tower, the Mausoleum of Mohammed V, the Kasbah of the Udayas and Chellah.
7. How the four compare
- Largest medina: Fes, by a wide margin.
- Liveliest: Marrakech, day and night.
- Quietest: Meknes, where you may have monuments almost to yourself.
- Easiest to walk: Rabat, which is flat, green and unhurried.
- Best for crafts: Fes.
- Best base for the desert: Marrakech or Fes.
8. How to visit all four
The cities form a natural loop. From Casablanca, go north to Rabat, inland to Meknes and Fes, then south to Marrakech. Trains link all four, and a week is enough to see them without hurrying.
Many travellers add the desert between Fes and Marrakech, crossing the Middle Atlas to Merzouga and returning through the gorges and kasbahs.
Local tip: Meknes and Volubilis fit comfortably into the day you travel between Rabat and Fes.
9. Getting between them
The four cities are well connected, which makes the loop simple to plan.
- Casablanca to Rabat: about 1 hour by train or road
- Rabat to Meknes: about 2 hours
- Meknes to Fes: about 45 minutes to 1 hour
- Fes to Marrakech: 6.5 to 7 hours by train, or three days through the desert
Frequently Asked Questions
Which imperial city is the best to visit?
Fes for history and craft, Marrakech for energy and variety. If you only have time for one, choose by temperament.
How many days do I need for the imperial cities?
Six to seven days: two each in Fes and Marrakech, one in Rabat, and Meknes on the way.
Is Casablanca an imperial city?
No. It is Morocco's largest city and economic capital, but it was never the seat of a dynasty.
Can I visit the royal palaces?
The working royal palaces are closed to the public. You can photograph the golden gates in Fes and walk the esplanade in Rabat, and former palaces such as the Bahia in Marrakech are open as museums.
What is the best order to visit them?
Rabat, Meknes, Fes and then Marrakech works well from Casablanca, saving the liveliest city for the end.
See It on One of Our Tours
-
7-Day Morocco Tour from Casablanca: Imperial Cities7 Days / 6 Nights · Casablanca → Rabat → Fes → Ifrane → Marrakech
-
6-Day Morocco Desert Tour from Casablanca to Marrakech6 Days / 5 Nights · Casablanca → Meknes → Fes → Merzouga → Marrakech
-
10-Day Morocco Tour from Casablanca via the Sahara Desert10 Days / 9 Nights · Casablanca → Chefchaouen → Fes → Merzouga → Marrakech


