fielded 10,000 troops, Hovhannes-Smbat III of Ani sent 3,000 men, the King of Kapan sent 2,000, and even the King of Georgia sent 4,000, while David also secured the public backing of the Catholicos of Albania. As a result, Abu'l-Aswar was defeated and evicted from Tashir. Ashot IV and Hovhannes-Smbat III died at almost the same time (), and Ashot's son Gagik II () succeeded them both and began consolidating his position. The chief danger to his throne was the Byzantine Empire, which throughout the early 11th century had been encroaching on the Armenian principalities. Hovhannes-Smbat had even bequeathed his kingdom to the Empire, and after his death, Emperor Michael IV the Paphlagonian () sent troops to capture Ani. Gagik managed to repel the attack, and political turmoil in Constantinople gained him a couple of years of reprieve after that, but in 1042 a new emperor, Constantine IX Monomachos (), came to the throne determined to secure Byzantine claims in Armenia. To this end, he contacted Abu'l-Aswar and called upon him to attack the Armenians from the rear. Abu'l-Aswar agreed, in exchange for guarantees that he would retain his conquests, a request granted in an imperial chrysobull. Faced with a two-pronged assault, Gagik was forced to visit Constantinople. There he was kept hostage and Ani was surrendered to the Byzantines in 1045. Notwithstanding his previous promises, immediately after taking possession of Ani, the emperor requested that Abu'l-Aswar vacate the fortresses he had conquered. When the latter refused, a large army under Michael Iasites and the magistros Constantine the Alan, containing numerous Armenians, marched against Dvin. Abu'l-Aswar let them approach, and then opened the irrigation canals and flooded the plain around the city. Stuck in the mud, the besiegers were easy prey for the Shaddadid archers, who inflicted huge casualties on the Byzantine force. Constantine IX responded by placing Katakalon Kekaumenos and the parakoimomenos Constantine in charge of Armenia. Instead of attacking Dvin, however, the new Byzantine leadership concentrated its efforts on recovering the forts captured by Abu'l-Aswar. Surmari, Anberd, and Khor Virap fell to the Byzantine army, but Chelidonion (modern Yerevan) resisted until September 1047, when the outbreak of a rebellion led by Leo Tornikios forced the army's recall to Constantinople. A peace treaty was hastily concluded, whereby Abu'l-Aswar agreed not to raid Byzantine territory and to recognize the authority of the emperor. The successful resistance of Dvin put an