Rabat grew from an Almohad ribat into Morocco's Atlantic capital
Rabat, Morocco's capital on the Atlantic at the Bou Regreg mouth opposite Salé, holds about 515,600 people (2024) and anchors a metro of roughly 2.1 million (2025)—second after Casablanca. Almohads founded it in the twelfth century as Ribatu al-Fath, stronghold of victory.
Decline followed early growth; seventeenth-century corsairs used the harbour. The French protectorate made it administrative centre in 1912, and independence in 1956 kept it as capital. It is one of four imperial cities; the medina is UNESCO-listed, served by ONCF rail and Rabat–Salé Airport.
The coast was settled long before. Phoenicians founded trading posts along this shore, though whether they built a town called Sala here is debated, and neo-Punic was still being written in the 1st century BC as Roman influence grew. Sala was emptying by the 5th century and largely ruined when Arab Muslims arrived in the 7th. In the 10th century the Umayyads of Córdoba or their Zenata allies built a ribat, probably where the Kasbah of the Udayas now stands, to face the Kharijite Barghawata.
Abd al-Mu'min raised a kasbah with a palace and mosque in 1150 or 1151, and Abu Yusuf Ya'qub al-Mansur planned a vast walled imperial capital with an enormous mosque, whose remains include the Hassan Tower. Salé across the river later overshadowed it; in 1515 Leo Africanus counted only 100 inhabited houses. After Spain expelled the Moriscos in 1609, refugees from Hornachos settled the kasbah, and in 1627 the two banks formed the corsair Republic of Bou Regreg.
The Alawi founder al-Rashid took the area in 1666, yet piracy lasted until Moulay Slimane's reign and provoked an Austrian bombardment in 1829. Lyautey moved the capital from Fez to Rabat after the riots that followed the 1912 Treaty of Fes.
Source: Rabat