خروجه عن قرطبة ومجيئه إليهم طردوا ابنيه ومن كان معهما من البربر، وضبطوا البلد، وقدموا على أنفسهم ثلاثة رجال من شيوخ البلد وأكابرهم وأهم العناصر أبو القاسم محمد بن إسماعيل بن عباد اللخمي ومحمد بن بريم الإلهامي ومحمد بن محمد ابن الحسن الزبيدي، ومكثوا كذلك أياما مشتركين في سياسة البلد وتدبيره، ثم انفرد القاضي أبو القاسم بن عباد بالأمر واستبد بالتدبير وصار الآخران في جملة الناس، ولحق القاسم بشريش واجتمع البربر على تقدير ابن أخيه يحيى، زحفوا إلى القاسم فحاصروه حتى صار في قبضة ابن أخيه يحيى وانفرد ابن أخيه يحيى بولاية البربر وبقي القاسم أسيرا عنده وعند أخيه إدريس بعده إلى أن مات إدريس فقتل القاسم خنقا سنة إحدى وثلاثين وأربعمائة، وحمل إلى ابنه محمد بن القاسم بالجزيرة فدفنه هنالك فكانت ولاية القاسم مذ تسمى بالخلافة بقرطبة إلى أسره ابن أخيه ستة أعوام، ثم كان مقبوضا عليه ست عشرة سنة عند ابن أخيه إلى أن قتل كما ذكرنا في أول سنة إحدى وثلاثين، ومات وله ثمانون سنة، وله من الولد محمد والحسن، أمهما أميرة بنت الحسن بن قنون بن إبراهيم بن محمد بن القاسم بن إدريس بن إدريس بن عبد الله بن الحسن بن علي بن أبي طالب.
his leaving Qurtuba and his coming to them, they drove out his two sons and the Berbers who were with them, took control of the town, and put over themselves three men of the shaykhs of the town and its great men, and the most important elements [?]: Abu l-Qasim Muhammad ibn Ismaʿil ibn ʿAbbad al-Lakhmi, Muhammad ibn Barim al-Ilhami and Muhammad ibn Muhammad ibn al-Hasan al-Zubaydi. They stayed so for some days, sharing in the government and management of the town; then the qadi Abu l-Qasim ibn ʿAbbad took sole command and ruled alone, and the other two became like the rest of the people. Al-Qasim went to Sharish. The Berbers agreed on putting forward [?] his nephew Yahya; they advanced on al-Qasim and besieged him until he fell into the hands of his nephew Yahya. His nephew Yahya had sole rule over the Berbers, and al-Qasim remained a captive with him, and with his brother Idris after him, until Idris died; then al-Qasim was killed by strangling, in the year 431, and he was carried to his son Muhammad ibn al-Qasim in al-Jazira, who buried him there. Al-Qasim's rule, from when he took the title of caliph in Qurtuba until his nephew captured him, was six years; then he was held in custody by his nephew for sixteen years, until he was killed, as we mentioned, at the beginning of the year 31. He died aged eighty. Of children he had Muhammad and al-Hasan; their mother was Amira bint al-Hasan ibn Qannun ibn Ibrahim ibn Muhammad ibn al-Qasim ibn Idris ibn Idris ibn ʿAbd Allah ibn al-Hasan ibn ʿAli ibn Abi Talib.