The Masmuda (المصمودة, Berber: ⵉⵎⵙⵎⵓⴷⵏ) is a Berber tribal confederation of Morocco and one of the largest in the Maghreb, along with the Zenata and the Sanhaja. Today, the Masmuda confederacy largely corresponds to the speakers of the Shilha (Tachelhit) Berber variety, whereas other clans, such as Regraga have adopted Arabic.
The Masmuda settled large parts of Morocco, and were largely sedentary and practised agriculture. The residence of the Masmuda aristocracy was Aghmat in the High Atlas mountains. From the 10th century the Berber tribes of the Sanhaja and Zanata groups invaded the lands of the Masmuda, followed from the 12th century onwards by Arab Bedouins (see Banu Hilal).
Ibn Tumart united the Masmuda tribes at the beginning of the 12th century and founded the Almohad movement, which subsequently unified the whole of the Maghreb and Andalusia. After the downfall of the Almohads, however, the particularism of the Masmuda peoples prevailed once more, as a result of which they lost their political significance.
Prior to the arrival of the Banu Hilal in the late 12th century, the Masmuda were divided largely into three groups: the Ghumara in the north, the Barghawata in the central part of Morocco, and the Masmuda proper in the south.
The anonymous author of the Kitāb Mafāk̲h̲ir al-Barbar (roughly translates as "The Book of the Glories of the Berbers"), a work compiled in 1312, lists the sub-tribes of the Masmuda as: Haha, Regraga, Warika (Ourika), Hazmira, Gadmiwa, Henfisa, Hezerga, Doukkala, Hintata, Maghus, and Tehlawa.
In the north, the Masmuda were generally part of the Ghumara, along with two smaller tribes mentioned by the 11th-century writer al-Bakri: the Aṣṣada, settled between Ksar el-Kebir and Ouazzane, and another tribe settled near Ceuta.
In the south, they were divided widely into two groups: the Masmuda of the plains (north of the Atlas mountains) and the Masmuda of the mountains. In the plains, the main groups were: the Dukkala, the Banu Magir, the Hazmira, the Ragraga, and the Haḥa.