Imam Nasr ad-Din was a Lamtuna Berber religious and military leader, who in 1644-74 led an alliance of Sanhadja Berber tribes in an attempt to repulse the Maqil Arabs then entering their areas of the western Sahara desert (mainly today's Mauritania, southern Morocco and Western Sahara). The conflict (the Char Bouba, or 30-years war) was eventually lost by the Berber tribes, and they were reduced to subordinate roles in the elaborate tribal hierarchy that was then developed by the Arabo-Berber Moorish people that resulted from the fusion between indigenous and immigrant peoples.