ruler launched a series of invasions against Shirvan. In spring 1063, Abu'l-Aswar captured the Quylamiyan castle, marched on to the capital of Shirvan, Shamakhi, defeated the Shirvanshah's forces in battle, plundered their camp, and captured his own daughter, her treasure and retinue. He then withdrew to Arran, but in July returned to Shirvan to raid it. In the next year, he again invaded Shirvan and captured a number of fortresses, while the local Kurdish tribes went over to him. After his return to Ganja, a peace treaty was signed with the Shirvanshah in June/July 1064, whereby Abu'l-Aswar returned Quylamiyan in exchange for 40,000 gold dinars. In 1064, the Seljuk sultan Alp Arslan invaded Byzantine Armenia and took Ani. Abu'l-Aswar himself led raids into the area, capturing the unidentified fortress of Wyjyn ("one of the best in Armenia" according to Münejjim Bashi). Münejjim Bashi further records that Alp Arslan handed over control of Ani to him; Ibn al-Athir reports the transfer to an unnamed emir, while Vardan Areveltsi records that the fortress was granted only to Abu'l-Aswar's son and successor, Fadl. Immediately after his return to Ganja and the dispersal of his army, however, the Alans again crossed the Darial Pass in October 1065, and, allied with the inhabitants of Shakki, raided Arran. At Shamkur they killed more than 200 volunteers for the jihad, and raided even to the very gates of Ganja itself, before moving on to raid the environs of Barda'a. Abu'l-Aswar and his troops preferred to remain within the protection of the walled cities rather than face the raiders in the field, and the Alans reached all the way to the Araxes before turning back north, along with the prisoners they had taken. Abu'l-Aswar died on 19 November 1067, and was buried at the main mosque of Ganja. He was succeeded by his eldest son, Fadl II, whom he had already announced as his heir, and to whom the oath of allegiance (bay'ah) had been taken by the Shaddadid family, the army and the people of Arran. Apart from Fadl, Abu'l-Aswar had four more sons—Ashot, Iskandar, Manuchihr, and Marzuban—as well as an unnamed daughter, wife of the Shirvanshah Sallar. Abu'l-Aswar's reign represented the zenith of the Shaddadid dynasty, but their fall began almost immediately after his death: the Seljuks strengthened their grip on Arran and the other principalities of the region, and Alp Arslan visited Ganja in person