He was appointed by the caliph al-Mahdi in late 780 with jurisdiction over military affairs, while a separate official was selected to handle matters of taxation. The historian Ibn Taghribirdi mentions that during his governorship both Egypt and the Maghreb suffered from a series of violent conflicts, and that Egyptian troops were briefly sent to assist Barqa but were later withdrawn without engaging in any fighting. He remained as governor until mid-781, when he was dismissed and replaced with Ibrahim ibn Salih.[1]