The next two centuries, however, marked a turbulent period in the town's history. After Bugha al-Kabir's destructive 852-855 campaign in Armenia, the Shaybanid emirs wrested control of Baghesh from the Zurārids; thereafter, in the first quarter of the tenth century, it was taken by the Kaysite emirs of Manzikert. In his 929-30 campaign against the Kaysites, the Byzantine general John Curcuas was able to capture and annex Baghesh. Following the devastation of the Arab emirs in the second half of the tenth century, a great number of Kurds settled in Baghesh and at the end of the tenth century, the city fell into the hands of the Kurdish Marwanid dynasty after breaking from Buyid rule. At the end of the eleventh century, with the collapse of Byzantine power after the Battle of Manzikert, Bitlis fell under the control of Togan Arslan, a subject of the Shah Arman (Also called Ahlatshah) dynasty based in Akhlat' after brief Dilmachoglu rule. It was also ruled by Ayyubid (1207–1231), Khwarezm Shahs (shortly rule in 1230), Sultanate of Rûm (1231–1243) and Ilkhanate (1243–1335).