While, on the other hand, the Būyide or Daylamite dynasty was becoming daily more powerful, and was gradually absorbing the whole of Persia and trespassing on the Western possessions of the Sāmānides, the representatives of this house had become mere puppets in the hands of their ministers, many of whom were Turks, who, like their kinsmen the Mamlūks of Egypt, had risen from the position of slaves to the highest offices in the state.

Thus in the year A.H. 350 (961), on the death of `Abd el-Melik I., Mansūr I., his brother and successor, met with serious opposition from a certain Turk named Alptagin, governor of Nīshāpūr, who refused to recognise his claims. Resort was had to arms, and, after a battle at Balkh, the results of which are variously stated, Alptagin withdrew to Ghazna, where he established himself so strongly that he was able to repulse the army sent by Mansūr to attack him. On the death of Alptagin in A.H. 366 (976) the leadership of those men who had accompanied him to Ghazna passed to another Turk named Sabuktagin. The choice was fortunate, for Sabuktagin proved himself to be a general of great talent; and by means of little frontier engagements he succeeded in rapidly extending his territories, and ultimately in founding a powerful dynasty which, under his successor, was to bring Northern India, Persia, and the East under its sway. Although Sabuktagin was the nominal vassal of the Sāmānides,[243] he was in reality an independent ruler. This was, moreover, the case in a lesser or greater degree with many of the governors in Khorāsān and the neighbouring dependencies.


CHAPTER XVI
The Kara-Khānides, or Uïghūrs

While the Sāmānides were thus harassed by the powerful Daylamites in the west, by the growing power of Sabuktagin in the south, and the fear of insubordination in their own states, a force still more formidable had arisen on their northern frontier, where a Turkish state had been founded which extended from Kāshghar to the Sea of Aral. The relations of this state with its southern neighbours were at first of a peaceful and even friendly character; but when the nomads perceived that Iranian authority was on the wane they began to cast longing eyes across the Jaxartes. They probably belonged to the tribe of Uïghūr, which had been the first to separate from the main body of the Turkish race and settle down in a home on the slopes of the Tien-shan.[244]

According to the Mohammedan historian Juvaynī,[245] the Uïghūrs originally came from the valley of the Orkon River. The first king whose name has come down to us was Būkū Khān, whom tradition has identified with the great Afrāsiyāb.[246]

Būkū Khān, having learnt in a dream that he would possess the entire world, assembled his troops and sent his brothers to wage war against the Mongols, Kirghiz, Tanguts, and Khitāys.[247] They returned to their dwelling-place with great booty, and founded the city of Urdu Bālik. Būkū Khan again dreamt that a piece of jade was given him with the assurance that as long as he preserved it he would rule the world. The prospect induced him to turn his arms to the west and enter Turkestān, where he built the city of Balāsāghūn.[248] We know from Chinese sources that these Uïghūrs[249] had their abode in the seventh century in the north-west of Mongolia; that in the eighth century they dwelt near the place where, in the five hundred years later, the Mongols built Karakorum. In the ninth century their empire in Mongolia was destroyed by the Kirghiz, when they were dispersed, and apparently split into two parties. The eastern branch came into contact with Chingiz Khān. After and thenceforward they appear in the Mongol-Chinese annals as under the name of Wei-wu-rh.[250] Of the Western Uïghūrs little is known, but they may be identified with the Eastern Turks of Mohammedan authors of the eleventh and twelfth centuries.[251]

The first of the Uïghūr Khāns of Turkestān who plays any great part in Mohammedan history is Boghrā Khān, whose capital was Balāsāghūn, and who ruled over Kāshghar (called Urdu Kend), Khotan, Karakorum, Tarās, and Fārāb (Otrār).[252] He was contemporaneous with Nūh III., seventh of the Sāmānide line, whose reign was characterised by the utmost confusion and anarchy. Two of Nūh’s most powerful nobles—Abū `Alī Sīmjūr, governor of Khorāsān, and Fā´ik, governor of Herāt, whose insubordination had received severe but well-merited punishment at the hands of their master—made treacherous overtures to Boghrā Khān, and invited him to attack Nūh. The invitation was accepted with alacrity by the Uïghūr prince, who at once set out for Samarkand, which was delivered over to him by the faithless Fā´ik, whom Nūh had intrusted with its defence. The feeble representative of the Sāmānides, thus betrayed, fled from his capital, which Boghrā Khān shortly after entered in triumph, and became practically master of Transoxiana. But the climate of Bokhārā did not suit him. He set out for his home, when death overtook him ere he had gone many stages, A.H. 383 (993). Meanwhile Nūh re-entered Bokhārā and regained possession of his dominion. But though he was heartily welcomed by the people he did not feel secure from the treachery of his nobles, and on this account he invited the great Sabuktagin, in the year A.H. 384 (994), to come to his aid. Sabuktagin immediately hastened over the mountain passes at the head of 20,000 men, and, crossing the Oxus, joined Nūh at Kesh. Seconded by his son Mahmūd, he gained three victories over the rebel lieutenants at Herāt, Nīshāpūr, and finally at Tūs. Fā´ik had in the meanwhile fled to Ilik Khān, the son and successor of Boghrā Khān, and Bokhārā was threatened with a second Uïghūr invasion. In reply to the menace, Sabuktagin, who had quarrelled with Nūh, concluded a peace with Ilik, and appointed the rebellious Fā´ik governor of Samarkand.

In A.H. 387 (997) both Sabuktagin and Nūh died, and were respectively succeeded by the valorous and talented Mahmūd, and by Mansūr II. who exhibited qualities precisely the reverse.

Transoxiana fell into the power of Ilik Khān, while Mahmūd of Ghazna gained possession of Khorāsān. Turks had long held high office in the states of Islām in Central Asia, as well as in Baghdād and in Egypt, where they had founded a powerful dynasty. It was, therefore, no great change for them to find themselves, as a nation, masters of the extensive kingdom of which Bokhārā was the capital.