Rabat is the capital of Morocco, a city on the Atlantic coast at the mouth of the Bou Regreg river, facing its twin town of Salé across the estuary. The 2024 census counted 515,619 people in the city proper, which makes it only Morocco’s seventh-largest city, although its metropolitan area of roughly 2.1 million is second only to Casablanca’s. Rabat has been the seat of government since the French moved the administration here from Fez in 1912, and Morocco kept it as its capital at independence in 1956. What sets it apart is how much of its eight-century history still stands in a few square kilometres: the medina, the Almohad walls and the colonial-era new town were inscribed together as a UNESCO World Heritage Site in 2012. The clearest way to understand the city is to walk it one building at a time.
The Kasbah of the Udayas, Where Rabat Began in 1150
The oldest part of present-day Rabat sits on the bluff where the Bou Regreg meets the ocean. The name Rabat itself comes from the Arabic ribat, a fortified outpost, and a ribat probably stood on this hill as early as the 10th century, when the Umayyads of Córdoba or their Zenata Berber allies built one to hold back the Barghawata Berbers to the south. The Almoravid emir Tashfin ibn Ali rebuilt it in the 1140s, but the Almohads destroyed it, and in 1150 or 1151 the Almohad caliph Abd al-Mu’min raised a new citadel on the site, with a palace, a mosque and an underground canal that brought fresh water to the headland.
The kasbah’s most colourful chapter came four and a half centuries later. After Philip III of Spain ordered the expulsion of the Moriscos in 1609, about 2,000 refugees from the town of Hornachos near Badajoz occupied the kasbah, and between 5,000 and 14,000 more Moriscos followed. In 1627 they joined with Salé to form the Republic of Bou Regreg, a self-governing base for the corsairs Europeans called the Salé Rovers, who raided merchant shipping and sold captured crews into slavery. The corsairs built a signalling platform on the kasbah’s northeastern edge, below which lay a seaside artillery platform, and in the 18th century a low round “Tower of the Corsairs” was added just upriver, its four cannon openings only 3 metres above the water. The republic lasted until 1666, when the ‘Alawi sultan al-Rashid brought the estuary under his control.
The kasbah takes its present name from the Udaya, a military tribe that Sultan Moulay Isma’il (r. 1672–1727) partly settled here; the name only stuck in the 19th century, after the rest of the tribe was expelled from the Fez region and joined them. Moulay Isma’il’s royal residence inside the walls now serves as a museum, and the kasbah’s monumental gate, Bab Udaya, which al-Mansur inserted into Abd al-Mu’min’s walls between 1195 and 1199, is still its showpiece.
Bab er-Rouah and the Almohad Walls of Ribat al-Fath
Abd al-Mu’min’s grandson, the caliph Abu Yusuf Ya’qub al-Mansur (r. 1184–1199), wanted far more than a citadel. He laid out a new imperial city called Ribat al-Fath, “the stronghold of victory”, enclosing an enormous area south of the kasbah with walls that were finished by 1197. The name Rabat is a shortened form of that title.
The finest survivor of that project is Bab er-Rouah, the “Gate of the Winds”, in the western wall. Its name probably refers to the Atlantic gales, which over eight centuries have weathered its reddish stone to a duller grey. The façade is framed by two bastion towers and carved with three concentric arches of lobed and radiating motifs, with a Kufic Qur’anic inscription around the frame. Its archway is smaller than the original because the sultan Sidi Muhammad ibn Abdallah partly filled it in during the second half of the 18th century. The gate’s interior, renovated in 2000–2001, is now used as an art gallery.
Al-Mansur’s city was never filled. After his death in 1199 his successors lacked the money or the will to complete it, and the Almohad capital stayed in Marrakesh. By 1515 the traveller Leo Africanus reported only about 100 inhabited houses in Rabat. The walls, however, survived, and they still define the edge of the historic city.
The Hassan Tower and Its 348 Columns
Inside the walls, on the high south bank of the river, al-Mansur began what would have been the largest mosque in the western Islamic world. Construction started in 1191 (some sources say 1195, linking it to his victory at the Battle of Alarcos), and the plan measured 183 by 139 metres, larger even than the Great Mosque of Córdoba. Its minaret, modelled on that of the Koutoubia Mosque in Marrakesh, was intended to be the largest minaret in the world, at least 64 metres tall, and was climbed by ramps rather than stairs.
When al-Mansur died, work stopped. The minaret was left at 44 metres, and the prayer hall at the foundations of its walls and 348 columns. Almost everything portable was later carried off for building elsewhere, and the 1755 Lisbon earthquake damaged what remained. No one knows for certain why the tower is called “Hassan”; the name is recorded as early as the 13th century, and the suggestion that it was the architect’s name has never been proved.
French and Moroccan archaeologists excavated and partly reconstructed the site in the 20th century. Today the rows of column stumps are the city’s most photographed space, and the tower was one of the monuments that carried Rabat onto the UNESCO list in 2012.
Chellah: Roman Sala and a Marinid Necropolis
Just south of the Almohad walls lies a site much older than Rabat itself. Chellah began as a trading settlement: neo-Punic finds date back to the 3rd century BC, and the name comes from the Punic word for “rock”. Under the Mauretanian client kings Juba II and Ptolemy it grew into a town with temples on terraces above the river, and after Ptolemy’s death in 40 AD Rome annexed the region. As Sala Colonia it became, with Lixus, one of the two main Roman naval outposts on the Atlantic coast of Mauretania Tingitana, with a forum, a triumphal arch and a main street whose remains are visible today. A Roman military unit stayed until the end of the 5th century.
The ruined town gained a second life in 1284–85, when the Marinid sultan Abu Yusuf Ya’qub buried his wife Umm al-’Izz here and was himself laid beside her in 1286. Chellah became the dynasty’s royal necropolis. Abu Sa’id Uthman II enclosed it with walls, and his son Abu al-Hasan, the “Black Sultan”, completed the main gate in July 1339, according to its inscription. Abu al-Hasan was buried here after dying in exile in 1351, the last sultan to be laid to rest at Chellah.
After the Marinids the necropolis declined. A pretender to the throne, Ahmad al-Lihyani, pillaged it in the early 15th century, the 1755 earthquake brought down much of what stood, and it was looted again in 1790. Twentieth-century excavations exposed the Roman town beneath, and Chellah now doubles as one of the smaller stages of the Mawazine music festival.
Henri Prost’s Ville Nouvelle and the 1912 Move from Fez
For most of its history Rabat was a secondary city; Fez and Marrakesh were Morocco’s great capitals. That changed with the Treaty of Fes, which made Morocco a French protectorate in March 1912. After riots in Fez that year, the resident-general Hubert Lyautey moved the administration to Rabat, arguing that the coast was more accessible and that Casablanca, which he expected to become the economic centre, was close by. In 1913 he hired the planner Henri Prost to lay out a Ville Nouvelle, a new administrative quarter inside the empty southern half of al-Mansur’s walls.
The public buildings that filled the new quarter still stand: the Bank al-Maghrib building of the 1920s, the Central Post Office (around 1921), the Parliament building of the 1920s, St Peter’s Cathedral (inaugurated in 1921) and the Rabat-Ville railway station, built in neo-Moorish, Art Deco and early modern styles. The old medina was left largely intact behind the 17th-century Andalusian Wall, so the historic and colonial cities sit side by side rather than one on top of the other, and the 2012 UNESCO listing covers both.
Being the capital transformed the city’s size and make-up. The 1921 census counted 33,714 residents, of whom 59% were Moroccan Muslims, 10% Moroccan Jews and 21.4% French nationals. The population reached about 156,000 by 1952 and about 368,000 by 1971, by which time foreigners made up only 3.5% of residents. Rabat also became a diplomatic venue: the Organisation of Islamic Cooperation was founded at a summit here in 1969, and the 1974 Arab League summit in Rabat recognised the PLO as the sole legitimate representative of the Palestinian people.
The Mausoleum of Mohammed V and the New Bou Regreg Skyline
When Mohammed V died in 1961, his son Hassan II commissioned a tomb for him on an elevated platform at the southeastern corner of the Hassan Tower esplanade, beside the ruins of al-Mansur’s mosque. The Vietnamese architect Cong Vo Toan designed it with traditional forms in modern materials: white marble outside, a pyramidal green-tiled roof, zellij tilework inside and a mahogany dome set with coloured glass. It was completed in 1971, and Mohammed V’s body was moved there that year; his son Prince Abdallah was buried there in 1983 and Hassan II in 1999.
The newest landmarks face the old city across the river. The Rabat–Salé tramway, the first of Morocco’s modern tram networks, opened in May 2011 and crosses the river on the Hassan II bridge to link the two banks. On the Salé side, the Mohammed VI Tower rises 250 metres over 55 storeys; designed by Rafael de La-Hoz with Hakim Benjelloun, it is the tallest building in Morocco and was inaugurated on 13 April 2026. On Rabat’s own bank, the Royal Theatre designed by Zaha Hadid, finished in 2021, finally opened to the public on 22 April 2026.
Standing on the Hassan Tower esplanade today, you can see eight centuries at once: an Almohad minaret, a 1971 royal tomb, and a 21st-century tower across the water. For how the country’s economic capital grew in a very different way, read our guide to Casablanca’s geography; for the city Rabat replaced as capital, see the medina of Fez; and for where Rabat sits in the national ranking, our list of the largest cities in Morocco sets out the numbers.
Quick Facts About Rabat
- Country: Morocco
- Continent: Africa (North Africa)
- Country population: approximately 38.8 million
- Capital city status: Rabat is the capital of Morocco, the seat of national government, and the location of foreign embassies, parliament, and the head of state's official residence.
Frequently Asked Questions
What is the capital of Morocco?
The capital of Morocco is Rabat. Rabat is the seat of national government, hosts most foreign embassies and consulates, and is typically where the head of state and parliament are located.
What continent is Rabat in?
Rabat, the capital of Morocco, is located in Africa, in the North Africa region. As Morocco's capital, Rabat serves as the country's primary connection to the broader African political, economic, and cultural sphere.
Why is Rabat the capital of Morocco?
Rabat was chosen as the capital of Morocco for reasons that typically combine geography, history, and politics. Capital city selections often reflect a desire for centrality (being accessible from across the country), historical importance (being a longstanding seat of government or culture), or neutrality (being acceptable to multiple regions or ethnic groups within the country). The specific reasons for Rabat's designation are detailed in the city's history above.
What is Rabat known for?
As the capital of Morocco, Rabat is best known for housing the country's central government institutions — parliament, presidential or royal residences, supreme court, and key ministries. It is also typically a major cultural and economic center within Morocco, hosting national museums, embassies, and signature monuments. The introduction and history sections above provide detailed coverage of the city's specific notable institutions and landmarks.
Related Pages
- Morocco Country Guide — full geography, climate, economy, and culture overview
- Flag of Morocco — meaning, history, and design of Morocco's national flag
