The Romans abandoned the colony in 250 AD, following which the Almohad rulers turned the city into a full-fledged fortress to launch an attack on Spain. Due to its military significance, the city was named Ribatu l-Fath, meaning "stronghold of victory", from which the city derived its current name.
Almohad ruler, Yaqub al-Mansur shifted the capital of his kingdom to Rabat. After his death, Rabat saw a period of decline. In 1627, the barbarian pirates united the cities of Rabat and Sale to form the Republic of Bou Regreg, and started using it as a base port.
All the attempts made by the European authorities to curb the pirates met with failure. In 1829, an Austrian ship was attacked by pirates, following which the Austrian authorities launched an offensive and destroyed Rabat.
The French invaded Rabat in 1912. The French administrator, General Hubert Lyautey decided to relocate the capital of the country from Fez back to Rabat. Meanwhile, the United States Air Force established an airbase at the former French airbase in the city.
When Morocco attained freedom from foreign rule in 1956, King Mohammed V, the then king of Morocco, decided to continue with Rabat as the capital. The United States Air Force vacated the airbase in early 1960s to make way for the Royal Moroccan Air Force base.
Morocco follows a constitutional monarchy form of government. King Mohammed VI is the ruler or the 'Kingdom of Morocco', while the Prime Minister is Abbas El Fassi. The mayor of Rabat is Omar El Bahraoui.
Being the capital city, Rabat is an important administrative center and has various administrative offices as well as the embassies of different countries located here. It is also the home to the administrative offices of many international organizations.