Claim: Rabat is a city.

Rabat -LRB- الرِّبَاط , ; Eṛṛbaṭ , ⴻⵕⵕⴱⴰⵟ -RRB- is the capital city of Morocco and its second largest city with an urban population of approximately 580,000 -LRB- 2014 -RRB- and a metropolitan population of over 1.2 million . It is also the capital city of the Eṛṛbaṭ-Sla-Qniṭra administrative region .   The city is located on the Atlantic Ocean at the mouth of the river Bou Regreg . On the facing shore of the river lies Salé , the city 's main commuter town . 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 .   Once a reputed corsair haven , Rabat served as one of the many ports in North Africa for the Barbary pirates , who were particularly active from the 16th through the 18th centuries .   Rabat is accessible by train through the ONCF system and by plane through the nearby Rabat -- Salé Airport .   The Moroccan capital was ranked at second place by CNN in its `` Top Travel Destinations of 2013 '' . It is one of four Imperial cities of Morocco , and the medina of Rabat is listed as a World Heritage Site .