When al-Layth reached the provincial capital of Zaranj in December 815 he occupied it with 400 cavalrymen and purged the city of Harb's loyalists, but he soon realized that the rebels enjoyed a significant numerical advantage in the countryside. Al-Layth therefore decided to reach out to the Kharijite leader Hamzah ibn Adharak, and the two agreed to form an alliance against Harb and Ibn al-Ash'ath. Eventually the rebels were defeated in a decisive battle; Harb subsequently disappeared, while Ibn al-Ash'ath fled to Zaranj but was captured, mutilated and killed by al-Layth.[7]