 During the taifa period, the Almoravid empire developed in northwest Africa.The core of the Almoravid empire was formed by the Lamtuna branch of the Sanhaja Berber.In the mid 11th century, they allied with the Guddala and Massufa Berber.