and each faction seized control of one district or another of al-Andalus. A host of troubles and incidents followed whose full narration would be lengthy. Al-Qāsim thereupon fled to Sharīsh (1), but al-Muʿtalī pursued him, laid siege to the town, captured him, and kept him in prison for many years. The people of Seville, meanwhile, drove out al-Qāsim’s two sons and set over themselves three men: the city’s qāḍī, Muḥammad ibn Ismāʿīl ibn ʿAbbād; Muḥammad ibn Yarīm al-Alhānī; and Muḥammad ibn al-Ḥasan al-Zubaydī. These three administered their affairs until the qāḍī eventually took power for himself, and that basket-maker—said, as mentioned before, to be al-Muʿayyad—was produced in order to lend him legitimacy.
Yaḥyā al-Muʿtalī then took Málaga and Algeciras (2), while his brother Idrīs ibn ʿAlī seized Tangier (3). Al-Qāsim languished in captivity; he lived to the age of eighty and was finally strangled in 431 AH.
- Yaḥyā ibn ʿAlī ibn Ḥammūd, known as al-Muʿtalī bi-llāh, the Alid
Abū Zakariyyā al-ʿAlawī, a Ḥasanid of the Idrīsī line, and his mother was also of ʿAlid descent. He gained mastery over most of al-Andalus and assumed the title of caliph. He appointed Prince ʿAbd al-Raḥmān ibn Abī ʿAṭṭāf as his deputy in Córdoba until 417 AH, after which his name was no longer proclaimed there. He repeatedly returned with armies until the Berber factions submitted, handed over their forts and citadels, and his authority became formidable. He then marched on Seville and besieged it, whereupon cavalry sallied forth from the city