History of Morocco: From Volubilis to the Atlantic Ports, Imperial Cities and the 19th Century
The Historical of Morocco: Dynasties, Imperial Cities and Atlantic Ports

Morocco sits where Africa, Europe and the Arab world meet, and its history shows it in every city. Phoenicians and Romans left ports and ruins. Arab and Amazigh dynasties built the imperial cities of Fes, Marrakech, Meknes and Rabat. Portuguese, Spanish and French fortresses line the Atlantic. This guide connects the story with the places where you can still walk through it.
Table of Contents
- A Short History of Morocco
- Morocco in the 19th Century
- Marrakech: The Red City
- Fes and the Historic Medina of Fes el-Bali
- Meknes and Volubilis
- Rabat and Chellah
- Atlantic Coast: Safi, El Jadida and Essaouira
- Taroudant and Agadir: Souss History
- Tangier: The Gate to Africa
- Casablanca: The Modern Port
- Morocco’s UNESCO Sites at a Glance
- Recommended History Tours: From Tangier, Fes, Casablanca and Marrakech
- FAQs
A Short History of Morocco
Amazigh Roots and Early Contacts

The Amazigh (Berbers) are Morocco’s original inhabitants. Phoenician traders set up coastal posts, and Rome later made northern Morocco part of the province of Mauretania Tingitana, with Volubilis as a key town.
The Idrisids and the Birth of Fes

In the late 8th century, Idris I founded the first Moroccan Muslim dynasty, and Fes soon became its heart. The University of al-Qarawiyyin, founded in 859 by Fatima al-Fihri, helped make the city a center of learning.
Almoravids and Almohads
The Almoravids founded Marrakech around 1070 and ruled from Morocco into Spain. The Almohads followed in the 12th century and left great monuments such as the Koutoubia minaret in Marrakech and the Hassan Tower in Rabat.
Marinids, Wattasids and Saadians
The Marinids (13th to 15th centuries) built the madrasas of Fes. In the 16th century the Saadians drove the Portuguese from much of the coast, defeated a Portuguese army at the Battle of the Three Kings in 1578, and made Marrakech their capital again.
The Alaouite Dynasty
Since the 17th century the Alaouites have ruled Morocco. Moulay Ismail (1672 to 1727) made Meknes his imperial capital and built walls, gates and storehouses on a vast scale. The dynasty remains in power today.
Morocco in the 19th Century
The 19th century was a time of pressure from Europe and of reform at home.
Early Century
Sultans such as Moulay Slimane (1792 to 1822) and Moulay Abderrahmane (1822 to 1859) tried to keep Morocco independent while managing tribal politics and growing European trade through ports like Tangier and Mogador (Essaouira).
The Defeat at Isly, 1844
Morocco supported the Algerian resistance leader Abd al-Qadir. France responded by bombarding Tangier and Mogador and defeating a Moroccan army at the Battle of Isly on 14 August 1844, near Oujda. This was a turning point that exposed the weakness of the Moroccan army.
War with Spain, 1859 to 1860
A conflict with Spain, known as the Tetouan War, ended in another defeat and heavy indemnities, which strained the treasury.
Reform under Hassan I
Sultan Hassan I (1873 to 1894) was one of the most capable rulers of the era. He modernized the army, sent students abroad, traveled constantly to hold the country together and managed to preserve independence while neighbors fell under European control.
The Road to the Protectorate
After Hassan I, debts, rivalries between European powers and internal unrest grew. The Algeciras Conference (1906) set rules for foreign influence, and in March 1912 the Treaty of Fes made Morocco a French protectorate, with Spain controlling the north and south. Morocco regained independence in 1956.
Marrakech: The Red City

Founded around 1070 by the Almoravids, Marrakech grew into an imperial capital. Its medina has been a UNESCO World Heritage Site since 1985.
What to See
- Koutoubia Mosque, the Almohad minaret that became a model for later towers
- Saadian Tombs and the ruins of El Badi Palace, reflecting 16th-century wealth
- Bahia Palace, built in the late 19th century and a good example of the era’s decorated architecture
- Jemaa el-Fna, the central square and market, still the city’s living stage
- The Mellah, the old Jewish quarter
History in a Sentence
Marrakech was the seat of the great Moroccan dynasties and gave the country its name in many European languages.
Fes and the Historic Medina of Fes el-Bali
Fes was the first Moroccan site inscribed by UNESCO, in 1981. Its medina, Fes el-Bali, is among the largest car-free urban areas in the world.
Highlights
- Al-Qarawiyyin, the mosque and university founded in 859
- Bou Inania and Attarine madrasas, with carved cedar, zellige and plaster
- The Chouara tanneries, working for centuries with traditional methods
- The Mellah of Fes, the first mellah in Morocco, created in the 15th century
- Craft quarters for brass, leather, pottery and weaving
Why It Matters
Fes was the intellectual and spiritual capital of Morocco and still keeps that character.
Meknes and Volubilis

Meknes
Moulay Ismail turned Meknes into a royal capital in the late 17th century. The city, listed by UNESCO in 1996, is known for huge ramparts, the Bab Mansour gate, royal stables and granaries, and the mausoleum of Moulay Ismail.
Volubilis
Near Meknes, Volubilis was a Roman town of Mauretania Tingitana, with basilica, triumphal arch and well-preserved mosaics. It was inscribed by UNESCO in 1997, and it sits close to Moulay Idriss Zerhoun, the holy town linked to Idris I.
Rabat and Chellah

Rabat became the capital of the French protectorate and remains Morocco’s capital. UNESCO inscribed it in 2012 as a “shared heritage” of different eras.
Main Sites
- Kasbah of the Udayas, a hilltop fortress and blue-and-white quarter above the river
- Hassan Tower and the Mausoleum of Mohammed V
- Chellah, a walled necropolis on the site of the Roman town of Sala. The Marinids built the monumental gate and tombs in the 14th century, and storks nest on its walls.
Atlantic Coast: Safi, El Jadida and Essaouira
Safi
A major pottery city and ancient port. The Portuguese built the Qasr al-Bahr (Sea Castle) in the early 16th century, and the old medina still has active potters’ workshops.
El Jadida

The Portuguese City of Mazagan was built in the early 16th century, held by the Portuguese until 1769, and was inscribed by UNESCO in 2004. Do not miss the Portuguese Cistern, the ramparts and the bastions.
Essaouira
Called Mogador in the past, Essaouira was laid out in the 18th century under Sultan Sidi Mohammed ben Abdallah as a fortified trading port. Its medina became a UNESCO site in 2001, and its ramparts, harbor and historic Jewish and Muslim communities define the city.
Taroudant and Agadir: Souss History
Taroudant

The “Grandmother of Marrakech” is surrounded by earth-red ramparts roughly 6 km long. It served as a Saadian base in the 16th century, and the walls are among the best preserved in Morocco.
Agadir, Oufella and Souk El Had
In 1540 the Saadian leader Mohammed ech-Cheikh built the Agadir Oufella kasbah on the hilltop to attack the Portuguese below. The earthquake of 29 February 1960 destroyed most of the old city, and the kasbah walls are the main surviving landmark, with views over the bay. Down in the city, Souk El Had is one of the biggest markets in the south, with thousands of stalls inside a walled enclosure.
Tangier: The Gate to Africa
Tangier, the ancient Tingis, has been a crossroads for Phoenicians, Romans, Portuguese, British and Spanish. The traveler Ibn Battuta was born here in the 14th century. Between the 1920s and 1956 it was an International Zone, which drew writers, artists, diplomats and spies.
Highlights
- The Kasbah and the old medina
- Grand Socco and Petit Socco
- Cape Spartel and the Caves of Hercules
- Historic cafés and the old Jewish quarter
Casablanca: The Modern Port
Casablanca grew from a small port into Morocco’s economic capital in the 19th and 20th centuries. French urban planning in the protectorate era produced its Art Deco and Mauresque buildings, and the Hassan II Mosque, completed in 1993, stands over the Atlantic.
Morocco’s UNESCO Sites at a Glance
| Site | Year inscribed |
|---|---|
| Medina of Fes | 1981 |
| Medina of Marrakech | 1985 |
| Ksar of Ait Benhaddou | 1987 |
| Historic City of Meknes | 1996 |
| Volubilis | 1997 |
| Medina of Tetouan | 1997 |
| Medina of Essaouira | 2001 |
| Portuguese City of Mazagan (El Jadida) | 2004 |
| Rabat | 2012 |
Recommended History Tours: From Tangier, Fes, Casablanca and Marrakech
From Tangier
Start with Tangier’s medina, Kasbah and international-zone history, then continue to Tetouan, Chefchaouen, Volubilis, Meknes and Fes. This route covers the north and the imperial cities.
From Fes
Explore the Medina of Fes el-Bali, al-Qarawiyyin, the madrasas and the tanneries, then Meknes, Volubilis, Moulay Idriss and Rabat.
From Casablanca
Begin at the Hassan II Mosque and the old medina, then follow the coast to Rabat (Udayas, Hassan Tower, Chellah), El Jadida, Safi and Essaouira, ending in Marrakech.
From Marrakech
Combine Marrakech (Koutoubia, Saadian Tombs, El Badi, Bahia) with Essaouira, Taroudant and Agadir, or head across the Atlas to the kasbahs of Ouarzazate.
Why Travel with History Morocco Tours
Private expert guides explain the dynasties, the 19th-century story and the architecture on site, with comfortable transport and well-chosen stops so that history is part of every day.
FAQ
What is the oldest imperial city of Morocco?
Fes, founded in the late 8th century, is the oldest of the four imperial cities.
Which Moroccan cities were imperial capitals?
Fes, Marrakech, Meknes and Rabat.
When did the French protectorate begin?
In March 1912 with the Treaty of Fes. Independence came in 1956.
Walk Through Morocco’s History
Contact History Morocco Tours to design a private journey from Tangier, Fes, Casablanca or Marrakech through Morocco’s imperial cities, Atlantic fortresses and Roman ruins.