Pre-colonization
The Sahara has linked rather than divided the peoples who inhabit it and has served as an avenue for migration and conquest. Mauritania, lying next to the Atlantic coast at the western edge of the desert, received and assimilated into its complex society many waves of these migrants and conquerors.
What is now Mauritania was a dry savanna area during classical antiquity, where independent tribes like the Pharusii and the Perorsi (and the Nigritae near the Niger river) did a seminomadic life facing a growing desertification.
Romans did explorations toward this area and probably reached, with Suetonius Paulinus, the area of Adrar. There are evidences (coins, fibulas) of Roman commerce in Akjoujt and Tamkartkart near Tichit
Berbers moved south to Mauritania beginning in the 3rd century, followed by Arabs in the 8th century, subjugating and assimilating Mauritania's original inhabitants. From the 8th through the 15th century, black kingdoms of the western Sudan, such as Ghana, Mali, and Songhai, brought their political culture from the south.
The divisive tendencies of the various groups within Mauritanian society have always worked against the development of Mauritanian unity. Both the Sanhadja Confederation, at its height from the 8th to the 10th century, and the Almoravid Empire, from the 11th to the 12th century, were weakened by internecine warfare, and both succumbed to further invasions from the Ghana Empire and the Almohad Empire, respectively.
The one external influence that tended to unify the country was Islam. The Islamization of Mauritania was a gradual process that spanned more than 500 years. Beginning slowly through contacts with Berber and Arab merchants engaged in the important caravan trades and rapidly advancing through the Almoravid conquests, Islamization did not take firm hold until the arrival of Yemeni Arabs in the 12th and 13th centuries and was not complete until several centuries later. Gradual Islamization was accompanied by a process of Arabization as well, during which the Berber masters of Mauritania lost power and became vassals of their Arab conquerors.
From the 15th to the 19th century, European contact with Mauritania was dominated by the trade for gum arabic. Rivalries among European powers enabled the Arab-Berber population, the Maures (Moors), to maintain their independence and later to exact annual payments from France, whose sovereignty over the Senegal River and the Mauritanian coast was recognized by the Congress of Vienna in 1815. Although penetration beyond the coast and the Senegal River began in earnest under Louis Faidherbe, governor of Senegal in the mid-19th century, European conquest or "pacification" of the entire country did not begin until 1900. Because extensive European contact began so late in the country's history, the traditional social structure carried over into modern times with little change.
Read more about this topic: History Of Mauritania