The Berghouata were a medieval Berber tribe of the Atlantic coast of Morocco, belonging to the Masmuda group of tribes. After allying with a failed SufriKharijite rebellion in Morocco against the Abbasids, they established a kingdom in the area of Tamesna between 744 and 1058, when the Almoravids conquered them. The Berghouata kingdom followed a syncretic religion inspired by Islam featuring the second ruler of the dynasty, Salih ibn Tarif, as the final prophet.
Their first seven kings were:
Tarīf al-Matghari
Sālih son of Tarīf, who declared himself prophet in 744, and went away at the age of 47, promising to return
Ilyās son of Sālih (?792-842), who is said to have professed Islam publicly but Salih's religion secretly, and died in the 50th year of his reign.
Yūnus son of Ilyās (?842-888), who made Salih's religion official and killed all those who would not convert (killing 7,770 people, according to Ibn Khaldun's sources, some at a place called Tamlukeft). Curiously enough, he is also said to have performed the hajj. He died in the 44th year of his reign.
Abū Ghafīr Muhammad son of Ma`ād son of Ilyasa` son of Sālih (?888-917), who may also have been called a prophet (according to a poem Ibn Khaldun cites), and who had 44 wives and more sons. He died in the 29th year of his reign.
Abu'l-`Ansār Abdallah son of Abī Ghafīr (?917-961), buried at Ameslakht. He died in the 44th year of his reign.
Abū Mansūr `Īsā (?961-?), who was 22 when he became king.
Dates with question marks are calculated on the basis of a secondary source[1] (http://216.239.57.104/search?q=cache:FMO9uy6RKTUJ:www.mcb-algerie.org/barghwata.htm+barghwata+842&hl=en). Other info is from Ibn Khaldun.
Thus 'Abdullah ibn Yasin disappeared, this reformer who had seen the conquest of Sijilmassa, the Sus, Aghmat and the desert, and whose greatest title to glory was this Maliki reform which he preached with such great conviction that it brought about the adherence of the great Sanhaja tribes of the desert.
He was killed fighting the Barghawata, shortly after he was elevated to the spiritual command of the Murabitun.
Therefore Abu Bakr ibn 'Umar became the Amir and the Imam of the Sanhaja confederation of Maghrib al-Aqsa.
Ibnu Yasin and Yahya led many battles against heretical beliefs and pagan tribes and they succeeded in converting them to Islam "Tawheed".
In 451 A.H. Ibnu Yasin, may Allah have mercy upon him, was killed in an attack on the heretical Barghawata tribal confederation on the Moroccan coast and was buried in Rabat.
He left a memorable message to his followers: "stay united as one Ummah, never fear your enemy, and never fight between you for Khilaafah".