The short answer: Rabat became Morocco's capital in 1912, when the French protectorate moved the seat of government here from Fes — and the city has kept the role ever since, including after independence in 1956. It is not the biggest city (that is Casablanca), but being the capital is a political title, not a measure of size. Here is the fuller story, and why it still defines the city you visit today.
The short version
Morocco has had several capitals over its long history. The decisive modern moment came in 1912: after the Treaty of Fes established the French protectorate and unrest broke out in Fes, the French Resident-General Hubert Lyautey moved the administration to Rabat. When Morocco regained independence in 1956, King Mohammed V kept Rabat as the capital of the sovereign kingdom. More than a century on, it remains the seat of the monarchy, the government and the country's embassies.
Rabat's first imperial moment — the 12th century
Rabat is older than its modern capital status suggests. It began as a ribat — a fortified religious camp — established by the Almohads in the 12th century on the south bank of the Bouregreg, which gives the city its name. Its great ambition came under the Almohad sultan Yaqub al-Mansur (who reigned in the late 1100s), who planned a grand imperial capital here and began an enormous mosque. He died before it was finished, and the project was abandoned — which is why the Hassan Tower still stands as a magnificent unfinished minaret above a field of broken columns. The site is older still: the nearby Chellah preserves the Roman port of Sala Colonia beneath a later Merinid necropolis.
Why the French chose Rabat in 1912
After 1912, Lyautey needed a base for the new administration, and several reasons pointed to Rabat rather than the traditional capital, Fes:
- Security. Fes had just seen violent unrest, so moving the seat of government to a calmer city was a deliberate safety decision.
- Access. Rabat sat on the Atlantic coast, far easier to reach and supply by sea and rail than landlocked Fes.
- Proximity to Casablanca. Lyautey correctly foresaw that nearby Casablanca would become Morocco's economic engine, and wanted the capital close to it.
- Room to build. Rabat had space beside its old medina for a planned modern town — the Ville Nouvelle laid out under architect Henri Prost — without disturbing the historic core.
That planned colonial city, set beside the medieval medina and the 12th-century Kasbah of the Udayas, is part of why Rabat's historic core is now UNESCO World Heritage listed.
So is Casablanca the capital? (No — and here's the distinction)
This trips up a lot of visitors. Casablanca is not the capital — it is the economic and financial capital, and by far the largest city, with around four million people to Rabat's roughly half a million in the city proper. Casablanca has the main international airport, the biggest port and the corporate towers. But the political capital is Rabat, where the royal palace, the parliament, the ministries and the embassies sit. In short: Casablanca runs the country's business, Rabat runs its government. The two are only about 90 km apart and linked by a fast, frequent train, so they work almost as a pair — see our guide to getting from Rabat to Casablanca by train.
Morocco's four imperial cities
Rabat is one of Morocco's four imperial cities — the cities that have each been a royal capital at some point: Fes, Marrakech, Meknes and Rabat. Fes and Marrakech were capitals under successive medieval dynasties; Meknes was the showpiece capital of Sultan Moulay Ismail in the 17th century; and Rabat, after its brief Almohad ambition, became the permanent modern capital in 1912. Tracing the imperial cities is a classic way to read Moroccan history on the ground — and of the four, Rabat is the calmest and easiest to enjoy.
What it means for visitors today
Capital status shapes the whole feel of the city. As the seat of government, Rabat is orderly, green and noticeably calm, with a diplomatic quarter of embassies, broad ceremonial avenues and the working Royal Palace complex — the Dar al-Makhzen — whose outer grounds you can walk through. It also means strong transport links, with the main rail line and the Al Boraq high-speed train serving the city, and a concentration of national monuments and museums. For a relaxed, safe-feeling city break with real depth, it is a quietly brilliant choice — which is exactly the case we make in basing yourself in Rabat. To see the monuments and museums efficiently, our full-day private tour of the capital covers the headline sights in a day.
Frequently asked
Why is Rabat the capital of Morocco and not Casablanca?
Because the capital is a political and administrative title, not a measure of size. Rabat was made the seat of government in 1912 by the French protectorate and kept that role after independence in 1956, and it is where the royal palace, the parliament, the ministries and the embassies all sit. Casablanca is far larger — around four million people to Rabat's roughly half a million in the city proper — and is Morocco's economic and financial capital, with the main port and busiest airport. But economic weight and capital status are separate things: Casablanca runs the country's business, while Rabat runs its government.
When did Rabat become the capital of Morocco?
In 1912, at the start of the French protectorate. After the Treaty of Fes was signed in March 1912 and unrest broke out in Fes, the French Resident-General, Hubert Lyautey, moved the seat of power from Fes to Rabat. Rabat has been the capital continuously ever since — through independence in 1956, when King Mohammed V kept it as the capital of the newly sovereign kingdom, and right up to today. So the city has held the title for well over a century.
Was Fes the capital of Morocco before Rabat?
Yes. Fes was the imperial capital for long stretches of Moroccan history and was the seat of power immediately before 1912. It is one of the country's oldest cities, founded in the late 8th century, and a centre of learning and religion. When Lyautey relocated the administration to Rabat in 1912 — partly for security after riots in Fes, partly because the Atlantic coast was easier to reach and supply — Fes lost the political role it had held. It remains Morocco's great spiritual and cultural city, but no longer the capital.
Is Casablanca the capital of Morocco?
No — this is one of the most common misconceptions about Morocco. Casablanca is the biggest city and the economic capital, but the political capital is Rabat. The confusion is understandable: Casablanca is more famous internationally, has the main international airport (Mohammed V), the largest port and the country's business district. But the government, the royal palace and foreign embassies are all in Rabat, about 90 km up the coast, and that is where official state business is conducted.
Why did the French choose Rabat in 1912?
Several reasons came together. Fes, the existing capital, had just seen violent unrest, so moving the seat of government to a calmer city was a security decision. Rabat sat on the Atlantic coast, which made it easier to reach and supply by sea and rail, and it was close to Casablanca, which Lyautey correctly predicted would become Morocco's economic powerhouse. Rabat also had room beside its old medina to lay out a planned modern town — the Ville Nouvelle designed under architect Henri Prost — without disturbing the historic core. Lyautey is also said to have simply liked the city.
What are Morocco's four imperial cities?
Fes, Marrakech, Meknes and Rabat — the cities that have each served as a royal capital at different points in Moroccan history. Fes and Marrakech were capitals under successive medieval dynasties; Meknes was the grand capital of Sultan Moulay Ismail in the 17th century; and Rabat had an early imperial moment under the Almohads in the 12th century before becoming the permanent modern capital in 1912. Visiting the imperial cities is a classic way to trace the arc of Moroccan history, and Rabat is the most relaxed of the four.
What does Rabat's capital status mean for visitors today?
It shapes the city's whole character. As the seat of government, Rabat is well-ordered, green and noticeably calm, with a diplomatic quarter of embassies, broad ceremonial avenues and the working Royal Palace complex (the Dar al-Makhzen, whose outer grounds you can see but not enter). It also means excellent transport links — the main rail line and the Al Boraq high-speed train both serve the capital — and a concentration of national monuments and museums. For travellers, that adds up to an easy, safe-feeling and rewarding city break.
See the capital properly
A century of history, walked in a day.
Rabat Tours runs private, guided days through the capital — the Udayas, the Hassan Tower, the Chellah and the royal quarter — with the context that makes it all make sense, or builds Rabat into a wider Morocco itinerary so every leg is handled before you arrive.
Plan your visit