الحكم المستنصر بالله
Al-Hakam II sent Muhammad Ibn Abī ‘Āmir to north Africa in 973–974 to act as (chief justice) to the Berber groups that had accepted Umayyad authority. Ibn Abī ‘Āmir was treasurer of the household of the caliph's wife and children, director of the mint at Madinat al-Zahra, commander of the Cordoba police, and qadi of the frontier. During his time as qadi in north Africa, Ibn Abi Amir developed close ties with the North African Berbers.