He was originally a slave of Harun al-Rashid (r. 786–809), and was freed by him when he rose to the throne.
[3] His tenure was 13 years according to Ya'qubi, although he and al-Tabari differ on when he was dismissed from office: according to Ya'qubi's chronology that was in 808, while al-Tabari records that he continued in office until after Harun al-Rashid's death.
[3] His long tenure was successful in imposing order and securing the trade routes of the region, but the harshness of his rule was such that the oppressed people of Yemen sent a delegation to Harun to remove him.
[1][4] His very harshness provoked the uprising of the Himyarite chieftain al-Haysam ibn Abd al-Majid al-Hamdani in the Yemen, which began around 798 and lasted until the rebel leader's defeat and capture in 807.
[5][4] His son, Muhammad, was a military commander who sided with Caliph al-Amin in the Fourth Fitna.