Treaty of Ili
Yakub Beg was defeated in 1877. This was not so much by Chinese superiority as by a combination of circumstances. In order to build up his kingdom he was compelled to impose heavy taxation, and this made him unpopular with his own followers: they had to pay taxes under the Chinese, but the Chinese collection had been much less rigorous than that of Yakub Beg. It was technically impossible for the Ottoman empire to give him any aid, even had its internal situation permitted it. Britain and Russia would probably have been glad to see a weakening of the Chinese hold over Turkestan, but they did not want a strong new state there, once they had found that neither of them could control the country while it was in Yakub Beg's hands. In 1881 Russia occupied the Ili region, Yakub's first conquest. In the end the two great powers considered it better for Turkestan to return officially into the hands of the weakened China, hoping that in practice they would be able to bring Turkestan more and more under their control. Consequently, when in 1880, three years after the removal of Yakub Beg, China sent a mission to Russia with the request for the return of the Ili region to her, Russia gave way, and the Treaty of Ili was concluded, ending for the time the Russian penetration of Turkestan. In 1882 the Manchu government raised Turkestan to a "new frontier" (Xinjiang) with a special administration.
This process of colonial penetration of Turkestan continued. Until the end of the first world war there was no fundamental change in the situation in the country, owing to the rivalry between Great Britain and Russia. But after 1920 a period began in which Turkestan became almost independent, under a number of rulers of parts of the country. Then, from 1928 onward, a more and more thorough penetration by Russia began, so that by 1940 Turkestan could almost be called a Soviet Republic. The second world war diverted Russian attention to the West, and at the same time compelled the Chinese to retreat into the interior from the Japanese, so that by 1943 the country was more firmly held by the Chinese government than it had been for seventy years. After the creation of the People's Democracy mass immigration into Xinjiang began, in connection with the development of oil fields and of many new industries in the border area between Xinjiang and China proper. Roads and air communications opened Xinjiang. Yet, the differences between immigrant Chinese and local, Muslim Turks, continue to play a role.