When Oqasha was reassembling his forces once more in the Zab, he came across a large Berber army coming from the west, under the command of the Hawwara Berber chieftain Abd al-Wahid ibn Yazid al-Hawwari (possibly dispatched by the Berber caliph Khalid ibn Hamid al-Zanati, although he is not mentioned in the chronicles). Abd al-Wahid's army was composed of some 300,000 Berber troops, ostensibly the largest Berber army ever seen. After a quick consultation, Oqasha and Abd al-Wahid agreed on a joint attack on Kairouan, Oqasha taking his forces along a southerly route, while Abd al-Wahid led his large army through the northern passes, converging on Kairouan from both sides.