Xinjiang
Early history

The earliest inhabitants of the region encompassing modern day Xinjiang were genetically of Ancient North Eurasian and Northeast Asian origin, with later geneflow from during the Bronze Age linked to the expansion of early Indo-Europeans. These population dynamics gave rise to a heterogeneous demographic makeup. Iron Age samples from Xinjiang show intensified levels of admixture between Steppe pastoralists and northeast Asians, with northern and eastern Xinjiang showing more affinities with northeast Asians, and southern Xinjiang showing more affinity with central Asians.

Between 2009 and 2015, the remains of 92 individuals in the Xiaohe Cemetery were analyzed for Y chromosome and mitochondrial DNA markers. Genetic analyses of the mummies showed that the paternal lineages of the Xiaohe people were of almost all European origin, while the maternal lineages of the early population were diverse, featuring both East Eurasian and West Eurasian lineages, as well as a smaller number of Indian / South Asian lineages. lineages. Over time, the west Eurasian maternal lineages were gradually replaced by east Eurasian maternal lineages. Outmarriage to women from Siberian communities, led to the loss of the original diversity of mtDNA lineages observed in the earlier Xiaohe population.

The Tarim population was therefore always notably diverse, reflecting a complex history of admixture between people of Ancient North Eurasian, South Asian and Northeast Asian descent. The Tarim mummies have been found in various locations in the Western Tarim Basin such as Loulan, the Xiaohe Tomb complex and Qäwrighul. These mummies have been previously suggested to have been Tocharian or Indo-European speakers, but recent evidence suggest that the earliest mummies belonged to a distinct population unrelated to Indo-European pastoralists and spoke an unknown language, probably a language isolate.

Although many of the Tarim mummies were classified as Caucasoid by anthropologists, Tarim Basin sites also contain both "Caucasoid" and "Mongoloid" remains, indicating contact between newly arrived western nomads and agricultural communities in the east. Mummies have been found in various locations in the Western Tarim Basin such as Loulan, the Xiaohe Tomb complex and Qäwrighul.

Nomadic tribes such as the Yuezhi, Saka and Wusun were probably part of the migration of Indo-European speakers who had settled in Tarim Basin of Xinjiang long before the Xiongnu and Han Chinese. By the time the Han dynasty under Emperor Wu (r. 141–87 BC) wrested the western Tarim Basin away from its previous overlords (the Xiongnu), it was inhabited by various peoples who included the Indo-European -speaking Tocharians in Turfan and Kucha, the Saka peoples centered in the Shule Kingdom and the Kingdom of Khotan, the various Tibeto-Burmese groups (especially people related to the Qiang) as well as the Han Chinese people. Some linguists posit that the Tocharian language had high amounts of influence from Paleosiberian languages, such as Uralic and Yeniseian languages.

Yuezhi culture is documented in the region. The first known reference to the Yuezhi was in 645 BC by the Chinese chancellor Guan Zhong in his work, Guanzi (管子, Guanzi Essays: 73: 78: 80: 81). He described the Yúshì, 禺氏 (or Niúshì, 牛氏), as a people from the north-west who supplied jade to the Chinese from the nearby mountains (also known as Yushi) in Gansu. The longtime jade supply from the Tarim Basin is well-documented archaeologically: "It is well known that ancient Chinese rulers had a strong attachment to jade. All of the jade items excavated from the tomb of Fuhao of the Shang dynasty, more than 750 pieces, were from Khotan in modern Xinjiang. As early as the mid-first millennium BC, the Yuezhi engaged in the jade trade, of which the major consumers were the rulers of agricultural China."

Crossed by the Northern Silk Road, the Tarim and Dzungaria regions were known as the Western Regions. At the beginning of the Han dynasty the region was ruled by the Xiongnu, a powerful nomadic people. During the 2nd century BC, the Han dynasty prepared for war against Xiongnu when Emperor Wu of Han dispatched Zhang Qian to explore the mysterious kingdoms to the west and form an alliance with the Yuezhi against the Xiongnu. As a result of the war, the Chinese controlled the strategic region from the Ordos and Gansu corridor to Lop Nor. They separated the Xiongnu from the Qiang people on the south and gained direct access to the Western Regions. Han China sent Zhang Qian as an envoy to the states of the region, beginning several decades of struggle between the Xiongnu and Han China in which China eventually prevailed. During the 100s BCE, the Silk Road brought increasing Chinese economic and cultural influence to the region. In 60 BCE, Han China established the Protectorate of the Western Regions (西域都護府) at Wulei (烏壘, near modern Luntai), to oversee the region as far west as the Pamir Mountains. The protectorate was seized during the civil war against Wang Mang (r. AD 9–23), returning to Han control in 91 due to the efforts of general Ban Chao.

The Western Jin dynasty succumbed to successive waves of invasions by nomads from the north at the beginning of the 4th century. The short-lived kingdoms that ruled northwestern China one after the other, including Former Liang, Former Qin, Later Liang and Western Liáng, all attempted to maintain the protectorate, with varying degrees of success. After the final reunification of Northern China under the Northern Wei empire, its protectorate controlled what is now the southeastern region of Xinjiang. Local states such as Shule, Yutian, Guizi and Qiemo controlled the western region, while the central region around Turpan was controlled by Gaochang, remnants of a state (Northern Liang) that once ruled part of what is now Gansu province in northwestern China.

During the Tang dynasty, a series of expeditions were conducted against the Western Turkic Khaganate and their vassals: the oasis states of southern Xinjiang. Campaigns against the oasis states began under Emperor Taizong with the annexation of Gaochang in 640. The nearby kingdom of Karasahr was captured by the Tang in 644 and the kingdom of Kucha was conquered in 649. The Tang Dynasty then established the Protectorate General to Pacify the West (安西都護府) or Anxi Protectorate, in 640 to control the region.

During the Anshi Rebellion, which nearly destroyed the Tang dynasty, Tibet invaded the Tang on a broad front from Xinjiang to Yunnan. It occupied the Tang capital of Chang'an in 763 for 16 days, and controlled southern Xinjiang by the end of the century. The Uyghur Khaganate took control of Northern Xinjiang, much of Central Asia and Mongolia at the same time.

As Tibet and the Uyghur Khaganate declined in the mid-9th century, the Kara-Khanid Khanate (a confederation of Turkic tribes including the Karluks, Chigils and Yaghmas) controlled Western Xinjiang during the 10th and 11th centuries. After the Uyghur Khaganate in Mongolia was destroyed by the Kirghiz in 840, branches of the Uyghurs established themselves in Qocha (Karakhoja) and Beshbalik (near present-day Turfan and Ürümqi). The Uyghur state remained in eastern Xinjiang until the 13th century, although it was ruled by foreign overlords. The Kara-Khanids converted to Islam. The Uyghur state in Eastern Xinjiang, initially Manichean, later converted to Buddhism.

Remnants of the Liao dynasty from Manchuria entered Xinjiang in 1132, fleeing rebellion by the neighboring Jurchens. They established a new empire, the Qara Khitai (Western Liao), which ruled the Kara-Khanid and Uyghur-held parts of the Tarim Basin for the next century. Although Khitan and Chinese were the primary administrative languages, Persian and Uyghur were also used.
length_constraints:number_sentences[4]