 At the time, Iraq and its dependencies were split between the pro-Alid forces of al-Mukhtar al-Thaqafi in Kufa and the forces of Ibn al-Zubayr's brother Mus'ab in Basra.In August 686, Ibn Ziyad's 60,000-strong army was routed at the Battle of Khazir and he was slain, alongside most of his deputy commanders, at the hands of al-Mukhtar's much smaller pro-Alid force led by Ibrahim ibn al-Ashtar.The decisive defeat and the loss of Ibn Ziyad represented a major setback to Abd al-Malik's ambitions in Iraq.