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