الحكم استجلبه من العراق، فلما وصل المرية مات الحكم، فبقي حائرا وكان مقلا ثم نهض إلى قرطبة فشرف فقهاؤها بمكانه، وبقي بها مدة مضاعا حتى عرف ابن أبي عامر مكانه في العلم فرغب فيه، وقدمه إلى الشورى ثم ولى قضاء سرقسطة وكان من حفاظ رأي مالك إلا أنه كان على مذهب العراقيين من أصحابه، ويلقب أبوه إبراهيم "زق الإبرة" لشكاسة كانت في خلقه، ووالده إبراهيم هو الذي رحل به إلى أصيلة، من بلاد العدوة بلد بقرب طنجة، وهو اليوم خراب ويقال فيه أزيلة بالزاي وأصله من كورة شذونة وهو مدفون بقرطبة بمقبرة الرصافة، وصلى عليه القاضي أبو العباس بن ذكوان.
al-Hakam had brought him from Iraq, but when he reached al-Mariyya al-Hakam died, and he was left at a loss, being poor. Then he went up to Qurtuba, and its jurists were honoured by his presence. He remained there neglected for a time, until Ibn Abi ʿAmir came to know his standing in learning and took an interest in him; he advanced him to the council (shura), and then he was appointed judge of Saraqusta. He was one of those who knew by heart the opinion (raʾy) of Malik, except that he followed the doctrine of the Iraqis among his followers. His father Ibrahim was nicknamed “Ziqq al-ibra” because of a contrariness in his character. His father Ibrahim was the one who took him to Asila, a town of the land across the strait (al-ʿIdwa), near Tanja, which is today in ruins; it is also called Azila, with zay. His family came from the district of Shadhuna. He is buried in Qurtuba in the cemetery of al-Rusafa, and the judge Abu l-ʿAbbas ibn Dhakwan prayed over him.