Rabat is an African city.
Morocco . `` The Western Kingdom '' ; ⵜⴰⴳⵍⴷⵉⵜ ⵏ ⵍⵎⵖⵔⵉⴱ ) , is a sovereign country located in the Maghreb region of North Africa . Rabat ( الرِّبَاط , ; Eṛṛbaṭ , ⴻⵕⵕⴱⴰⵟ ) is the capital city of Morocco and its second largest city with an urban population of approximately 580,000 ( 2014 ) and a metropolitan population of over 1.2 million . 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 .