He had journeyed to Mecca, where the imam of the Hashimiyya Ibrahim ibn Muhammad appointed him as the military leader for the upcoming anti-Umayyad uprising in Khorasan.
His army took Nishapur, where Nasr had sought refuge, defeated a 10,000-strong Umayyad force at Gurgan in August and subsequently took Rayy.
There he wintered, and in March 749 he defeated a larger Umayyad army under Amir ibn Dubara, allegedly 50,000 strong, near Isfahan.
Qahtaba's army advanced swiftly with the aim of taking Kufa, but was confronted by the Umayyad governor, Yazid ibn Hubayra.
Qahtaba was able to launch a surprise night attack on the Umayyad camp, forcing Yazid and his troops to flee to Wasit.