 Some years later, Abu'l-Qasem had to temporarily leave the province due to an invasion by Karakhanids.No more rulers of Chaghaniyan are mentioned after this, and only a few years later the Seljuks took control of the region.During the reign of the Alp Arslan (r. 1063–1072), his brother Ilyas ibn Chaghri Beg was appointed as the governor of Chaghaniyan.