The Artsrunis had built up their power base in Vaspurakan in the 9th century, while Arab rule was waning the Bagratunis, were consolidating their control over Armenia.In 908, during the reign of Ashot's successor Smbat I, Gagik I Artsruni was recognized as king by the Sajid ruler Yusuf and allied with the latter to attack the Bagratuni kingdom.Aghtamar also served as the residence of the Armenian Catholicos while Dvin was under Muslim control, allowing Gagik to influence the election of several catholicoi and further increase his legitimacy.In 1021, King Senekerim-Hovhannes ceded the Kingdom of Vaspurakan to the Byzantine Empire, receiving Sebasteia and its territories extending to the Euphrates in return.After the Byzantine annexation, the Artsruni dynasty continued with Derenik, son of Gurgen-Khatchik, who became lord of Antzivazik by 1004 and had two brothers: Gugik and Ashot.