Rabat is the capital city of Morocco and the country's seventh largest city with an urban population of approximately 580,000 and a metropolitan population of over 1.2 million. It is also the capital city of the Rabat-Salé-Kénitra administrative region. Rabat is located on the Atlantic Ocean at the mouth of the river Bou Regreg, opposite Salé, the city's main commuter town.
Rabat was founded in the 12th century by the Almohad ruler Abd al-Mu'min as a military town. The city steadily grew but went into an extended period of decline following the collapse of the Almohads. In the 17th century Rabat became a haven for Barbary pirates. The French established a protectorate over Morocco in 1912 and made Rabat its administrative center. Morocco achieved independence in 1955 and Rabat became its capital.
Rabat, Temara, and Salé form a conurbation of over 1.8 million people. Silt-related problems have diminished Rabat's role as a port; however, Rabat, and Salé still maintain important textile, food processing and construction industries. In addition, tourism and the presence of all foreign embassies in Morocco serve to make Rabat one of the most important cities in the country.