Of Turkic origin, he became one of the leading Fatimid generals under al-Aziz, fighting against the Hamdanids and the Byzantines in Syria. He rebelled against the Berber-dominated regime of the early years of al-Hakim (r. 996–1021), but was defeated and died in captivity.