ثم قفل إلى المغرب، فاختلط في طريقه، واستقر ببجاية يثوب إليه عقله أحيانا فيتكلم في مسائل عويصة من النحو مشكلة مجيبا سائله عنها فيوضحها أحسن إيضاح، ثم يغلب عليه فيتلف، وبقي على تلك الحال مدة ببجاية، ثم زاد عليه خدر، نفعه الله، وتوفي بها، رحمه الله، سنة ثمانين، وقيل: سنة ثلاث وثمانين وخمس مئة، والأول أصح. وقال أبو جعفر بن الزبير: أحسب وفاته كانت في صدر عشر الثمانين وخمس مئة، فلم يضبط وفاته؛ ولذلك ذكره في تلك الطبقة، فاعلمه.
Then he returned to the Maghrib, and on his way his mind became disordered. He settled in Bijaya; his reason would return to him at times, and he would speak on abstruse and difficult questions of grammar, answering whoever asked him about them, and he would explain them in the best way; then it would overcome him and he would be lost. He remained in that state for a time in Bijaya; then a numbness increased upon him, God grant him benefit, and he died there, God have mercy on him, in the year eighty, or, it is said, in the year 583; the first is more correct. Abu Jaʿfar ibn al-Zubayr said: I reckon that his death was at the beginning of the decade of the eighties and five hundred. So he did not fix his death precisely, and for that reason he mentioned him in that class; so take note of it.