from among the Berbers, and the Berbers are said to descend from Qaydhār b. Ismāʿīl.
It is further related that the Berbers’ original abode was Palestine and that their king was Goliath. When the Prophet of Allah David killed him, the Berbers fled to the Maghrib and spread until they reached the farthest Sūs; the expanse of the lands they came to occupy measured roughly one thousand parasangs.
During the Umayyad period the Muslims campaigned against them; many of them embraced Islam, some of their offspring were taken captive, and the mother of al-Manṣūr as well as the mother of ʿAbd al-Raḥmān al-Dākhil were Berber women. Hence it was said, “The two sons of Berber women have come to rule the world.”
Those of them who accepted Islam adhered to the Khārijite and Ibāḍī creeds (1). They fought repeatedly and aimed at kingship until the Mahdī’s missionary reached them, won them over, corrupted their beliefs, and they rallied to the Mahdī (2), by whose aid he seized the Maghrib. Later, al-Muʿizz (3)—one of his descendants—marched at the head of a Berber army and conquered the Egyptian lands.
From that time onward they have continually risen against one another, even to this day. Among them are fierceness, courage, and a ready shedding of blood; they are nations beyond counting.
They ruled al-Andalus in 401 AH and accomplished great feats. Then they surged out of the Sahara—as we have mentioned—under Abū Bakr b. ʿUmar and held power for about eighty years, until Ibn Tūmart (5) emerged from the Daran mountains (4) together with his disciple ʿAbd al-Muʾmin (6), and they took possession of the Maghrib.