Taking advantage of the turmoil in the Caliphate after the death of Harun al-Rashid in 809 and during the ensuing civil war, Ashot was able to greatly expand his lands and authority. Ashot's rise was challenged by another ambitious family, the Muslim Jahhafids. The family's founder, Jahhaf, was a newcomer in Armenia who had established a considerable power base for himself by claiming Mamikonian lands through his marriage with a daughter of Mushegh VI Mamikonian, one of the Armenian leaders killed at Bagrevand. Ashot twice defeated the Jahhafids in Taron and Arsharunik. In the process he gained not only Taron (which Jahhaf had seized from another Bagratid, Vasak) and Arsharunik with Shirak (which he had earlier bought from the Kamsarakans), but also Ashotz, and eastern Tayk. Frustrated, Jahhaf and his son Abd al-Malik openly rebelled against the Caliphate by seizing the Armenian capital, Dvin, in 813, and unsuccessfully besieging the caliphal governor at Bardaa. Ashot defeated an army of 5,000 sent against him by Abd al-Malik, killing 3,000 of them, while Ashot's brother Shapuh raided the environs of Dvin. As Abd al-Malik prepared to march and confront Shapuh, the local populace rebelled and killed him.