A new and bewildering factor had now to be reckoned with in the rise of Islam; for its conquering spirit, which so profoundly affected the Near and Middle East and Northern Africa, even approached the confines of the distant Chinese empire. Yezdigird III., the last Persian monarch of the Sasanian dynasty, implored China for aid against the invading Arabs, but received the reply that Persia was too distant for help to be sent. Subsequently a son of the hapless Sasanian took refuge with the Chinese, but his attempt to win back the throne of his ancestors failed utterly. In 655, three years after the murder of Yezdigird at Merv, the Arabs despatched an embassy to China and thus opened up direct communication with the Celestial Empire, whose frontier officials must have watched their advance with apprehension.

The great Arab conqueror of Central Asia was Kutayba ibn Muslim, who made his headquarters at Merv, and, in a series of campaigns waged for a decade, subdued Bokhara, Samarcand and Farghana. About 715 he actually raided as far as Kashgar, described by the Arab historian as “a city near the Chinese frontier.” A curious legend of this campaign has been preserved, according to which Kutayba swore to take possession of the soil of China, and the ruler enabled him to fulfil his oath by the gift of a load of soil to trample on, a bag of Chinese money to symbolize tribute, and four youths to be stamped with his seal. Two years later the Arabs and Tibetans, taking advantage of the rebellion of the Western Turks, again penetrated into the “Four Garrisons.” This was the farthest east reached by the Arab armies, and the exploit is a signal proof of their marvellous initiative and warlike prowess.

Based on their garrison in Chinese Turkestan, the Chinese mainly devoted their energies to preventing the Tibetans from stretching out their hands to the Arabs through Gilgit and Yasin, in which districts the Celestials built forts; and we read of more than one campaign successfully conducted in these ice-bound highlands in pursuance of this policy. But the power of China in this distant province was short-lived. One of her generals, who had successfully conducted two campaigns to the south of the Hindu Kush, treacherously seized and put to death the tributary King of Tashkent. Under this king’s son the country rose, the Arabs were called in, and the Chinese, owing to the defection of their native allies, were annihilated. A few years later internal troubles broke out in China, and the Tibetans, taking full advantage of them, overran the province of Kansu and interrupted communications with the heart of the Empire. About this time, too, in 751, a Chinese army 30,000 strong was annihilated in the Gobi.

The deserted officials with consummate skill maintained Chinese authority for a whole generation after being thus cut off from China, as the Chinese traveller Wu Kung testifies. Returning home by way of the “Four Garrisons” after a long residence in India, he reached Kashgar in 786; and, remaining in the province for a considerable period, noted that everywhere he found Chinese governors. By 791, however, the Tibetans had destroyed this paper government, and their own, which took its place, and at one time even threatened their old allies the Arabs, lasted until, in turn, it was broken by the Uighurs. The complete disappearance of China from the scene marks the end of another period in the history of the province.

The Uighurs, whose ancestors claimed descent from the Huns, originally lived in north-west Mongolia and, when they were expelled by the Hakas from their homeland, two of their sections founded states in the eastern Tian Shan. A third section, with which we are more especially concerned, broke the power of the Tibetans about 860 and became the masters of Kashgar, although Khotan remained independent for some years. The rulers of this section of the Uighurs—known also as the Karluks or Karakhani—were termed the Ilak Khans, and the part they played on the stage of Central Asia was important. The career of these Uighurs was chequered, as in 840 Karakoram, their capital, was captured by the Kirghiz and their Paramount Chief was killed. This led to the dispersal of the tribe but not to its downfall, as Bishbaligh, the modern Urumchi, was occupied about this period and remained one of their chief centres for many centuries. They held sway under the designation of the Arslan or “Lion” Khans for many generations, and in the notices of the various embassies exchanged with China there is evidence that a comparatively high stage of civilization was reached in the country. Indeed their culture influenced Central Asia more than that of any other race, the script of the Mongols being adopted from the Uighurs, who in their turn had learnt it from the Manichaeans, or perhaps from the Nestorians.

The remarkable growth of the Persian creed of Manichaeism in Central Asia is closely connected with the Uighurs, whose chief became a convert to this faith in the eighth century. Among the manuscripts discovered by Sir Aurel Stein in the course of his excavations is a book of their omens, which makes curious reading: “A gambler staked his son and his servants. He went away after having won the hazardous game. Without losing his son and his servants, he won again ninety stray sheep. His son and his attendants all rejoice. Know ye this. This is good.” And again: “An old ox was being eaten by ants, by their gnawing around its body. It stands without being able to move. Know ye this. This is bad.” Manichaeans took part in the Uighur embassy sent to China in 806 and their religion existed in Chinese Turkestan until the thirteenth century.

The movement in favour of conversion to Islam began in Chinese Turkestan in the middle of the tenth century of our era, Boghra[11] Khan, a scion of the Karluk stock, being the first convert. The legend, as given in the fantastic hagiology known as the Tazkirat or “Chronicles of Boghra,” runs that the young Satok Boghra Khan, at the age of twelve, was secretly converted by a certain Abu Nasr, Samani. His stepfather, who was the reigning monarch, suspected this, and, in order to test his fidelity to the old religion, invited him to help in laying the foundation-stone of a new idol-temple. In despair the young prince sought the advice of Abu Nasr, who replied that, if he worked with the intention of building a mosque, he would obtain merit in the presence of Allah and be delivered from the evil designs of the infidels. Having escaped this danger, the young convert decided to make an end of his stepfather, and breaking into his apartment by night, he awoke him, being unwilling to kill a sleeping man. The monarch refused to accept Islam at the point of his nephew’s sword, but upon the prayer of Satok the earth opened and swallowed up the infidel, whose fate resembled that of Korah. As the chronicle runs: “The earth devoured Harun Boghra Khan, and he was not.”

Satok Boghra Khan enjoyed considerable power and captured Bokhara. His last campaign was undertaken against Turfan, where in 993 he fell ill and whence he was carried back, a dying man, to Kashgar. His son and successor, Hasan, is known to history as having ended the Samanid dynasty by the capture of Abdul Malik. In Chinese Turkestan he is still better known for having waged a desperate campaign with the “infidel” Prince of Khotan, whom he defeated; not, however, without first suffering a disaster, in which Ali Arslan, his nephew and the Kashgar champion, was killed. The body of the latter is buried on the field of battle at Ordam Padshah, to the east of Yangi Hissar, but his head is preserved at a shrine, in the Dolat Bagh, near Kashgar. A few years later both Hasan and his brother were killed by the Princes of Khotan, but this province, after a series of campaigns lasting twenty-four years, was ultimately annexed to Kashgar. From this period what we now call Chinese Turkestan was definitely occupied by the Turks. Turki became the universal language; and Grenard aptly draws attention to the fact that the oldest Kashgar book which has reached us, and which dates from 1068, is written in a pure Turki dialect.

In 1125 a new dynasty made its appearance in the Tarim basin. Yelui Tashi, a near relation of the head of the Kara Khitai or Leao dynasty of China, realizing that his position in the homeland was hopeless in view of the military superiority of the Nuchens, who subsequently founded the Kin dynasty, decided in that year to seek his fortune elsewhere. Collecting a force in Shensi, he marched into the valley of the Tarim and annexed it, thereby ending the dynasty of the Ilak Khans. He next invaded Western Turkestan, upon which he imposed an annual tribute of 20,000 pieces of gold, and later he assumed the title of Gur Khan or “Universal Lord.” He died in 1136. His successor, in alliance with Atsiz of Khwarazm or Khiva, inflicted a crushing defeat on the great Seljuk, Sultan San jar, in 1141. The Seljuk losses were estimated at one hundred thousand, and the Kara Khitai temporarily occupied Merv and Nishapur.

It is of special interest, as illustrating the wide range of Sadi’s travels, to note that the great Persian poet visited Kashgar at this period. He commences one of his stories as follows: “In a certain year Mohamed Khwarazm Shah, for some good reason, chose to make peace with Cathay. I entered the chief mosque of Kashgar and saw a boy with beauty of the most perfect symmetry,” etc.