The Berbers are the autochthonous inhabitants of North Africa. The sedentary agricultural tribes are largely old and long established, and certain important tribal names in the Rif may go back almost to the beginnings of Islam in Morocco in the late eighth century. Berber identification with Islam thus goes back itself to the initial Arab conquests in the late seventh century, barring initial resistance and certain resultant heresies. The sedentary Ishilhayen tribes of the Western Atlas are probably also long established, although there is little Arabic documentation on them prior to the early fifteenth century. The transhumant Imazighen tribes of Central Morocco are more recent, although the great northwest passage of Imazighen from the Saghro massif across the Atlas in search of grass for their sheep began about 1550 and was still unfinished when the Franco-Spanish protectorate was established in 1912. Primary resistance to colonial penetration was heaviest in the Berber-speaking areas. In the Rif, it was led by Muhammad bin 'Abd al-Krim al-Khattabi of the Aith Waryaghar in a major two-front war—first against Spain in 1921, then against both Spain and France in 1925-1926. In the Atlas, although the French won over to their side the three major quyad (sing. qa'id ), the tribal leaders of the Imtuggan, the Igundafen, and the Iglawn, resistance nonetheless began in 1913 and continued piecemeal, on a tribe-by-tribe basis for the most part, until the Ait 'Atta of the Saghro and the Ait Murghad and Ait Hadiddu of the eastern Central Atlas were "pacified" in 1933, and the Anti-Atlas was fully occupied the following year.
During this period, the French made the mistake of promulgating the "Berber Dahir," or decree of 1930, which placed all Berber tribes in their zone (although not those of the Spanish-held Rif) under the jural aegis of customary-law tribunals. In effect, this subtracted them from the jurisdiction of the Sharia, of Muslim law as enjoined by the Quran. At Moroccan independence in 1956, the Berber Dahir was rescinded, and normal Muslim law courts under qudat (sing. qadi ) were installed in the Berber-speaking areas. Since about 1986, customary law appears to be coming back in small and low-key ways, but not to the extent of resuscitating collective oaths (see "Social Control").