In 652, Ahnaf was forced to attack Herat again after the latter was once again revolting. He defeated the ruler of Herat and made a once again made treaty with him. However, the ruler of Herat along with the Karenids and many other natives of Khorasan, later rebelled against the Arabs, but were defeated at the battle of Badghis.