While Morocco has received limited numbers of student migrants and highly-skilled workers from sub-Saharan countries such as Senegal, Mali and Zaire, immigration remained very limited in the post-independence era.
This changed after the mid 1990s, when more and more trans-Saharan migrants started to migrate to Morocco, often in an attempt to cross the Mediterranean from the Moroccan coastline. Initially, this flow from sub-Saharan Africa seemed to be a reaction to political turmoil and civil war affecting several West African countries and the concomitant economic decline in regional destination countries such as Côte d´Ivoire. In particular the anti-immigrant backlash occurring in Libya since 2000 has encouraged more and more sub-Saharan migrants working there to join the flow of Moroccans and other Maghrebis who already started migrating illegally to southern Europe from the early 1990s.
However, it is a misunderstanding that all sub-Saharan migrants migrate to Morocco to cross to Europe. An increasing number of sub-Saharan migrants work or pursue studies in Morocco, sometimes as a means to gain residency status. In 2005, 25,000 African migrants were legally residing in Morocco, and their numbers seem to be increasing.