Qahtaba was a Khurasani Arab, belonging to the Yemeni tribal confederation that formed the bulk of the local Arab Muslim population. 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. This appointment was accepted by the main Abbasid leader, Abu Muslim, and following the fall of Merv to the Abbasids and their supporters in February 748, Qahtaba was placed in command of the Abbasid forces that pursued the last Umayyad governor of Khurasan, Nasr ibn Sayyar. 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 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 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. Qahtaba himself fell in this battle, but his son al-Hasan ibn Qahtaba assumed command and took possession of Kufa on 2 September. Both al-Hasan and his brother, Humayd ibn Qahtaba, were important military leaders in the early decades of the Abbasid regime.