Establishment of trading posts by the Phoenicians. These functioned separately from the communities in the interior of the country. Morocco becomes part of the province called Mauretania Tingitana. The Roman presence is met with hard resistance from the local rulers, resulting in numerous wars. Mauretania Tingitana is occupied by the Germanic tribe of Vandals.
Byzantine rule is established in coastal areas north and northwest in Morocco.
At this point both Arab culture and Islam starts to gain a strong positions in Morocco. Idriss was recognized among Moroccans as Imam , and with him, the line of Moroccan rulers start, first with the Idrissid dynasty. Moulay Idriss 2 takes power, and during his 20 years reign, control is extended to the northern mountains and to the oases south of the Atlas mountains . Idriss 2 made Fez his capital. The Idrisid dynasty falls apart, and Morocco is divided into smaller kingdoms.