The Bagratid dynasties – Bagratuni (Բագրատունյաց) in Armenia and Bagrationi (ბაგრატიონი) in Georgia – count among the longest-reigning royal families in the Caucasus (and in Europe), starting as princely houses and attaining to the royal status in both countries in the 9th century.
Valarsace then organized a subdivision of the empire, and conferred his greatest favors upon Bagarat - one of the ancestors of the Bagratunis.
By the early 9th century the former territories of the Kamsarakans in Arsharunik and Shirak (including Ani) had been incorporated into the territories of the Armenian Bagratuni dynasty.
As Islamic power was waning, Ashot I of the Bagratuni family got more influence in Armenia.