Mansūr II., after a reign of less than two years, was deprived of sight by one of his discontented courtiers named Bektuzun; and `Abd el-Melik II., a mere child, was set up in his stead. All power was now concentrated in the hands of Fā´ik and Bektuzun. When news of these events reached Ilik Khān in Kāshghar he sent a message to `Abd el-Melik to the effect that he would speedily take measures to protect him. Bektuzun immediately set out to oppose Ilik Khān, but he was unsuccessful, and in A.H. 389 (999) Ilik Khān entered Bokhārā. Instead, however, of helping the young prince, he cast him into prison, where he soon afterwards died.[253]
When, in A.H. 389 (999), Ilik Khān[254] wrested Transoxiana from the Sāmānides, their capital was removed to Bokhārā. In A.H. 398 (1007) they attempted to establish themselves south of the Oxus, but were driven back by Mahmūd of Ghazna, and henceforward their territory was restricted to Transoxiana, Kāshghar, and Eastern Tartary.[255]
About the beginning of the tenth century a prince of the hereditary house of the Khāns of Kāshghar, named Satuk Boghrā Khān,[256] became the first convert in that country to Islām, which he proceeded to force upon his subjects at the point of the sword, in the face of a determined and protracted opposition which prevented its spread beyond the limits of his own territory. It was only on the downfall of the Sāmānides that the creed of Mohammed, through proselytising zeal—of Mahmūd in the direction of Hindustān, and of Ilik Khān in that of Turkestān—received a fresh impetus, and spread north, south, and east with a rapidity only equalled by the violence employed by its propagators.[257]
According to Narshakhi,[258] Ilik Khān died in A.H. 403 (1012), and was succeeded by his brother Toghān Khān, who, a few days after his accession, was attacked by what appeared to be an incurable malady. The Sultans of Khitāy and Khotan, thinking to take advantage of his helpless state, advanced with an enormous host to attack his dominions.[259] But, on hearing of the approaching invasion, the Khān miraculously recovered his health and forthwith set out to oppose his enemies. We are told that they retreated without striking a blow as soon as they learnt that their quarry had regained his strength, but were hotly pursued and harassed by the Khān for three months.
Toghān Khān died in A.H. 408 (1018). He is spoken of in terms of the highest praise, both on account of his piety and his learning. His successor was Arslān Khān, who, however, was unable to preserve the integrity of his kingdom. Coming into conflict with Sultan Mahmūd, he was defeated and killed in the year A.H. 410 (1020).
Kādir[260] Khān, who now ascended the throne at Samarkand, is said to have brought the whole of Kāshghar and Khotan under his subjection. He died in A.H. 423 (1031), and was succeeded by his son Arslān Khān. During his reign he received a deputation from some Turks of Tibet, who, hearing of his justice and clemency, asked permission to settle in the neighbourhood of Balāsāghūn. He granted their request, and when they arrived he tried to compel their acceptance of Islām. This they refused, but as they were otherwise loyal and obedient he gave way and allowed them to remain in a state of heathenism.[261] Arslān Khān was overthrown in A.H. 425 (1033) by his brother Boghrā Khān, during whose reign the immigrant Turks embraced Islām (A.H. 432).[262] He died by poison in A.H. 439 (1047), and was succeeded by his son Ibrāhīm—the last chief of the house of Boghrā Khān.[263]
The kingdom of Kāshghar seems shortly afterwards to have fallen into the hands of another branch of the Eastern Uïghūrs, called by Narshakhi the Tufghāj,[264] the first of whose representatives, Ibrāhim, was killed in battle against Alp Arslān, the Seljūk, in A.H. 472 (1079), and was succeeded by his brother Khidhr Khān.[265] He apparently died in the same year, when his son Ahmed Khān came to the throne. The latter, in A.H. 482 (1089), was attacked and defeated by Melik Shāh, and sent prisoner to Isfahān; but soon afterwards he was reinstated as governor of Transoxiana. In 488 he was condemned to death by the mullās or doctors of Samarkand, on the ground that he professed heretical tenets acquired during his residence in Persian `Irāk. After him Mas`ūd Khān[266] reigned for a short period, and was succeeded by Kādir Khān, who in A.H. 495 (1101) perished in an insurrection fomented by him against Sanjar, the then governor of Khorāsān.
The next ruler of Samarkand was Mohammad Khān[267] ibn Sulaymān, who in A.H. 503 (1109) successfully defended his capital against the attack of a large Turkish force under a certain Sāghir Beg. He held this post until his death, and apparently continued in his loyalty to Sanjar, who, as we have seen, ascended the throne of the Seljūks in 511. We are not told when he died, but Narshakhi says that his son Nasr Khān was killed during a revolt in Samarkand in A.H. 523 (1128). On the death of his father, Nasr’s son Mohammad Khān wrote to inform Sanjar of what had passed. Sanjar thereupon set out with a force to establish order in Samarkand, but when he approached the town Mohammad Khān sent him an insolent message that the Sultan would do well to retreat, inasmuch as he (Mohammad) had subdued his opponents. Sanjar was much incensed, and promptly invested the city. After a protracted siege he captured Samarkand and took Mohammad prisoner, A.H. 524 (1129). A new governor was now appointed, but he died two years later, when the reins of power were given to Mahmūd Khān, the son of Mohammad.[268]
In the meanwhile another mighty host was advancing on Transoxiana; but before describing their progress we must retrace our steps and recount the downfall of the Ghaznavides and the rise of the great Seljūk dynasty of Persia.