 In 997 Ali took over Khwarazm following his father's death.Little is known of his reign, but his emirate was dependent upon the Karakhanids, rivals of the Ghaznavids.He died sometime around 1009 and was succeeded by his brother, Abu al-Abbas Ma'mun.