end to the Byzantine advance in Armenia, helping preserve the independence of the smaller Armenian realms of Syunik, Tashir and Khachen. Soon after, the regional balance of power was permanently altered with the first large-scale raid of the Seljuk Turks under Qutlumush ibn Arslan Isra'il and Ibrahim Inal into Byzantine Armenia in 1048. While the Shaddadids may have been tempted to see in them welcome allies against the Byzantines, they were equally likely to be a threat, as demonstrated by the attack on Ganja by Qutlumush in 1046/47. Shortly after, in late 1048 or early 1049—although some authors have suggested a later date, (A.F. Gfrörer and M.H. Yinanç) or even (E. Honigmann)—the Byzantines launched another offensive against Dvin under the rhaiktor Nikephoros. According to the contemporary Byzantine historian John Skylitzes, this was because Abu'l-Aswar ("Aplesphares", as the Byzantines called him) had violated the previous agreement and raided Byzantine lands. The Shaddadid ruler remained ensconced in Dvin, while the Byzantines devastated its environs "as far as the Iron Bridge and Ganja", forcing Abu'l-Aswar to renew his previous oath of subservience and hand over his great-nephew Ardashir, the son of Abu'l-Hasan Lashkari, as a hostage. Emir of Ganja (1049–67) In 1049, Abu'l-Aswar's nephew Lashkari, the emir of Ganja, died, after a troubled reign of 15 years. He was succeeded by his infant son Anushirvan, but actual power was in the hands of his chamberlain (hajib), Abu Mansur. After barely two months, a group of elders opposed to the new regime's policies deposed Abu Mansur while he was at Shamkur and called upon Abu'l-Aswar to assume control of Ganja as well. Abu'l-Aswar agreed and abandoned Dvin, which had become too exposed to the Byzantines. The city was left in the hands of a series of governors until 1053, when he appointed his son Abu Nasr Iskandar as ruler of the city and the surrounding regions. The Shaddadid ruler first set things in order in Shamkur, and then entered Ganja, taking possession "all the lands of Arran and its fortresses". At this point in his career, Abu'l-Aswar had achieved a considerable reputation as a ruler and a warrior; the Ziyarid prince Keikavus (), who later wrote a well-known mirror for princes, the Qabusnameh, even came to Ganja and spent several years at the Shaddadid court to participate in the jihad against the Christians, after having spent eight years at the court of Maw'dud of