During the Taifa era, the petty kings came from a variety of ethnic groups; some—for instance the Zirid kings of Granada—were of Berber origin. The Taifa period ended when the Almoravid dynasty took over Al-Andalus; they were succeeded by the Almohad dynasty from Morocco, during which time al-Andalus flourished.
During the Taifa era, numerous small kingdoms arose from diverse ethnic groups; some, such as the Zirid rulers of Granada, had Berber ancestry. The Taifa period ended with the rise of the Almohad dynasty from Morocco, which ultimately led to a flourishing of Al-Andalus.