Mukhtar al-Thaqafi
Ibn Ziyad had been tasked by Abd al-Malik's father with the reconquest of Iraq. 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. He refrained from further major campaigns in the province for the next five years, during which Mus'ab defeated and killed al-Mukhtar and his supporters and became Iraq's sole ruler.