- Ibn Khaldun distinguished three major groups among the Berbers: Zanata, Sanhaja, and Masmuda. He ascribed to each a separate genealogy leading to a common eponymous ancestor. Each of these groups consisted of a larger number of tribes that, in the case of Masmuda and Zanata, lived separated from each other and led different ways of life. The Masmuda branches and subgroups occupied the major parts of Morocco: the Ghommara all over the Rif as far as the straits and southward into the plains by the Abu Ragrag and Sabou rivers; their neighbors, the Barghwata, as far as the Oum al-Rabi`, which separated them from the Doukkala; further south, down to the Tansift River, the Ragraga; and gradually gaining the hill country, the Haha, and a number of minor groupings.In the middle of the 12th century, the Masmuda of the mountains and those of the plains united in their common faith in the religiopolitical doctrine preached by the Mahdi Ibn Tumart among the Hargha and Hintata in the western part of the High Atlas. Their union forged the Almohad Empire, the mightiest concentration of power in North Africa, and the frame of some of its splendid cultural achievements. When it started to lose its control, another family of Masmuda blood, the Hafsid, descendants of Ibn Tumart's devoted follower Abu Hafs `Umar of the Hintata, built up their power in Tunisia, which they controlled until the beginning of the 16th century. Today, the descendants of the ancient Masmuda are known as Shluh, making up the mass of Berber population in the High and Middle Atlas.
Historical Dictionary of the Berbers (Imazighen) . Hsain Ilahiane. 2014.