Emirate of Barghawata appeared in the Maghreb among a group of Berber tribes in the second century AH by a man among them who claimed prophecy and composed new laws. The end of the emirate was at the hands of the Almoravids, as Abu Bakr bin Omar eradicated the Emirate and collected its funds and divided it among the AlMoravids.

Most of what was written about them was after the extinction of their state and its final elimination, and then the famous saying, "Woe to the defeated" was realized.