# History of Xinjiang

Xinjiang consists of two main regions, geographically separated by the Tianshan Mountains, which are historically and ethnically distinct: Dzungaria to the north, and the Tarim Basin (currently mainly inhabited by the Uyghurs) to the south. In the 18th and 19th centuries, these areas were conquered by the Qing dynasty, which in 1884 integrated them into one province named Xinjiang (新疆; Xīnjiāng; 'new frontier').
The first inhabitants of Xinjiang, specifically from southern and western Xinjiang, formed from admixture between locals of Ancient North Eurasian and Northeast Asian descent. The oldest mummies found in the Tarim Basin are dated to the 2nd millennium BCE. In the first millennium BCE Indo-European-speaking Yuezhi nomads migrated into parts of Xinjiang. In the second century BCE the region became part of the Xiongnu Empire, a confederation of nomads centered on present-day Mongolia, which forced the Yuezhi out of Xinjiang.
Eastern Central Asia was referred to as "Xiyu" (Chinese: 西域; pinyin: Xīyù; lit. 'Western Regions') under the control of the Han dynasty, to whom the Xiongnu surrendered in 60 BCE following the Han–Xiongnu War, and which maintained a variable military presence until the early 3rd century CE. From the 2nd to the 5th century, local rulers controlled the region. In the 6th century, the First Turkic Khaganate was established. In the 7th-8th century, the Tang dynasty, Turks, and Tibetans warred for control, and the Tang dynasty established the Anxi Protectorate and the Beiting Protectorate in Xinjiang and part of Central Asia.
This was followed by the Uyghur Khaganate in the 8th-9th century. Uyghur power declined, and three main regional kingdoms vied for power around Xinjiang, namely the Buddhist Uyghur Kara-Khoja, the Turkic Muslim Kara-Khanid, and the Iranian Buddhist Khotan. Eventually, the Turkic Muslim Kara-Khanids prevailed and Islamized the region. In the 13th century it was part of the Mongol Empire, after which the Turkic people again prevailed. It was dominated by the Oirat Mongol-speaking Dzungar Khanate in the late 17th century.
In the 18th century, during the Dzungar–Qing Wars, the area was conquered by the Manchu Qing dynasty. After the Dungan Revolt (1862–1877), the area was reconquered by the Qing, who established the Xinjiang Province in 1884. It is now a part of the People's Republic of China.

## Etymology

Xinjiang consists of two main geographically, historically, and ethnically distinct regions with different historical names: Junggar Basin (Dzungaria) north of the Tianshan Mountains; and the Tarim Basin (Southern Xinjiang) south of the Tianshan Mountains.
In ancient China, the Tarim Basin was known as "Xiyu" or "Western Regions", a name that became prevalent in Chinese records after the Han dynasty took control of the region in the 2nd century BCE. It soon was traversed by the Northern Silk Road.
For the Uyghurs, who took control of northern Xinjiang in the 8th century, the traditional name of the Tarim Basin in southern Xinjiang was Altishahr, which means "six cities" in the Uyghur language. The region of Dzungaria in northern Xinjiang was named after its native inhabitants, the Dzungar Mongols.
In 1759 the Qing China conquered the region, which became known as "Xiyu Xinjiang" (Chinese: 西域新疆; lit. 'new frontier of the Western Regions') or simply Xinjiang (Chinese: 新疆; lit. 'new territory'), although Europeans commonly used the name "Chinese Turkestan" at the time to refer to the Tarim Basin in Southern Xinjiang (sometimes Xinjiang as a whole). Meanwhile, Russian Sinologist Nikita Bichurin coined the name "East Turkestan" (along with the name "West Turkestan", also known as Russian Turkestan) in 1829 intending to replace the European term "Chinese Turkestan", also being used to refer to the Tarim Basin.
In 1884 Qing China took over the state of Yettishar (or Kashgaria, created during the Dungan Revolt) and established the Xinjiang Province. In the late 19th century, there was a proposal to restore the old administration of Xinjiang into two provinces, the areas north and south of Tianshan (which was however not adopted).

## Ethnic identity

At the time of the Qing conquest in 1759, Dzungaria was mostly inhabited by the Oirat Mongol-speaking Dzungar people, while the Tarim Basin was inhabited by sedentary Muslim Uyghur people. They were governed separately until 1884.
The Qing dynasty was well aware of the differences between the former Buddhist-Mongol area to the north of the Tianshan mountains and Turkic-Muslim area south of the Tianshan, and ruled them in separate administrative units at first. However, Qing bureaucracy began to think of both areas as part of one distinct region called Xinjiang. The very concept of Xinjiang as one distinct geographic identity was created by the Qing, and it was originally not the native inhabitants who viewed it that way. During Qing rule, there was not much sense of "regional identity" held by ordinary Xinjiang people. Rather, Xinjiang's distinct identity was given by the Qing. It had a distinct geography, history, and culture from the rest of Qing China, while at the same was still Chinese territory, settled by the Han and Hui ethnic groups, distinct from the rest of Central Asia, and largely multicultural.

### Genetic studies

The earliest Tarim Basin people of southern and western Xinjiang appear to have arisen from a mixture between locals of Ancient North Eurasian and Northeast Asians 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 be of Tocharian origin, but recent evidence suggest that the mummies belonged to a distinct population unrelated to Indo-European pastoralists, such as Afanasievo..
Ancient as well as modern Uyghurs display variable degrees of East Eurasian and West Eurasian ancestry. James A. Millward described the original Uyghurs as physically East Eurasian, giving as an example the images in the Bezeklik Caves at temple 9, of the Uyghur patrons, until they began to mix with the Tarim Basin's inhabitants. However, a genetic study of early Uyghur remains from the core of the Uyghur Khaganate in Orkhon Valley, Mongolia said that the Uyghurs were mostly of West Eurasian ancestry, being modelled as genetically similar to the Iranian Alan and Sarmatian people, with significant East Eurasian admixture. The east–west admixture in the Uyghur Khaganate was said to have taken place around the year 500 AD.
One study by Xu et al. (2008), using samples from Hetian (Hotan) only, found Uyghurs have about an average of 60% European or West Asian (Western Eurasian) ancestry and about 40% East Asian or Siberian ancestry (Eastern Eurasian). From the same area, it is found that the proportion of Uyghur individuals with European/West Asian ancestry ranges individually from 40.3% to 84.3% while their East Asian/Siberian ancestry ranges individually from 15.7% to 59.7%. Li et al. (2010) analyzed the remains of Xiaohe individuals found at the Xiaohe Tomb complex (2nd millennium BCE) for Y-DNA and mtDNA markers. The study found that while Y-DNA corresponded to ancient Siberian populations, the mtDNA haplotypes were an admixture of East Asian and European origin. The initial admixture may have taken place in Southern Siberia, which was settled by the Indo-European Andronovo and Afanasievo cultures, as well as Paleo-Siberian cultures.
A study by Li et al. used a larger sample of individuals from a wider area and found a higher East Asian component of about 70% on average, while the European/West Asian component was about 30%. Overall, Uyghurs show relative more similarity to "Western East Asians" than to "Eastern East Asians". The authors also cite anthropologic studies which also estimate about 30% "Western proportions", which are in agreement with their genetic results. They summarized their study evidence: "In conclusion, we argue that the Uyghurs' genetic structure is more similar to East Asians than to Europeans".
Local inhabitants at Sampul cemetery (Shanpula; 山普拉) around 14 km (8.7 mi), from the archaeological site of Hotan in Lop County, where art such as the Sampul tapestry has been found, buried their dead from roughly 217 BCE to 283 CE. The analysis of mtDNA haplogroup distribution showed that the Sampula inhabitants had a large mixture of East Asian, Persian and European characteristics. According to Chengzhi et al. (2007), analysis of maternal mitochondrial DNA of the human remains has revealed genetic affinities at the maternal side to Ossetians and Iranians, an Eastern-Mediterranean paternal lineage.

## Early inhabitants (2nd–1st millennium BCE)
### Tarim mummies

A series of mummified human remains have been discovered in Xinjiang, owing to the extremely dry local climate. These cultures span the Bronze Age and Iron Age periods. Due to the West Eurasian appearance of many of the mummies, as well as their exotic material culture, there has been considerable linguistic and genetic research in to their origin.
The well-preserved Tarim mummies of southern and western Xinjiang show evidence of population admixture. Between 2009 and 2015, the remains of 92 individuals found at the Xiaohe Tomb complex were analyzed for Y-DNA and mtDNA markers. Genetic analyses of the mummies showed that the maternal lineages of the Xiaohe people originated from both East Asia and West Eurasia, whereas the paternal lineages all originated from West Eurasia. The Tarim mummies have been found in various locations in the western Tarim Basin such as Loulan, and Qäwrighul.
The Shan Hai Jing (4th-2nd century BCE) describes the existence of "white people with long hair" or Bai (白), who lived beyond the northwestern border. These are thought to have referred to the Yuezhi people. According to J. P. Mallory and Victor H. Mair, "[s]uch a description could accord well with a Caucasoid population beyond the frontiers of Ancient China," possibly the Yuezhi.
Mallory and Mair relate the earliest Bronze Age settlers of the Tarim and Turpan basins to the Afanasevo culture. The Afanasevo culture (c. 3500–2500 BCE) displays cultural and genetic connections with the Indo-European-associated cultures of the Eurasian Steppe yet predates the specifically Indo-Iranian-associated Andronovo culture (c. 2000–900 BCE) enough to isolate the Tocharian languages from Indo-Iranian linguistic innovations like satemization. Han Kangxin, who examined the skulls of 302 mummies, found the closest relatives of the earlier Tarim Basin population in the populations of the Afanasevo culture situated immediately north of the Tarim Basin and the Andronovo culture that spanned Kazakhstan and reached southwards into West Central Asia and the Altai.
The mummies have been described as being both "Caucasoid" and "Mongoloid" and mixed-race individuals are also observed.
Physical anthropologists propose the movement of at least two Western Eurasian physical types into the Tarim Basin. Mallory and Mair associate these types with the Tocharian and Iranian (Saka) branches of the Indo-European language family, respectively. However, archaeology and linguistics professor Elizabeth Wayland Barber cautions against assuming the mummies spoke Tocharian, noting a gap of about a thousand years between the mummies and the documented Tocharians: "people can change their language at will, without altering a single gene or freckle." Hemphill & Mallory (2004) confirm a second Caucasian physical type at Alwighul (700–1 BCE) and Krorän (200 CE) different from the earlier one found at Qäwrighul (1800 BCE) and Yanbulaq (1100–500 BCE). Mallory and Mair associate this later (700 BCE – 200 CE) Caucasian physical type with the populations who introduced the Iranian Saka language to the western part of the Tarim basin.
Recent genetic evidence by Zhang et al. 2021 rejected the proposal that the earliest Bronze Age Tarim mummies were Indo-European migrants. They found that the earliest specimens were mostly derived from Ancient North Eurasians, with some East Asian admixture. It was proposed that they spoke an isolated language. The authors proposed that the West Eurasian features of the earlier mummies could be attributed to their Ancient North Eurasian ancestry.

### Yuezhi

Various nomadic tribes, such as the Yuezhi, Saka, and Wusun are conjectured to be part of the migration of Indo-European speakers who were settled in Central Asia at that time.
The first reference to the nomadic Yuezhi was in 645 BC by Guan Zhong in his Guanzi (Guanzi Essays: 73: 78: 80: 81). He described the Yuzhi (禺氏), or Niuzhi (牛氏), as a people from the north-west who supplied jade to the Chinese from the nearby mountains of Yuzhi (禺氏) at Gansu.
The nomadic tribes of the Yuezhi are documented in Chinese historical accounts, in particular the 2nd–1st century BC "Records of the Great Historian", or Shiji, by Sima Qian. According to Han accounts, the Yuezhi "were flourishing" during the time of the first great Chinese Qin emperor, but were regularly in conflict with the neighboring Xiongnu tribe to the northeast.

## Xiongnu rule (2nd–1st century BCE)

At the beginning of the Han dynasty, the region was subservient to the Xiongnu, a powerful nomadic people.$^{:148}$ The Xiongnu were a tribal confederation of nomadic peoples who, according to ancient Chinese sources, inhabited the eastern Eurasian Steppe from the 3rd century BC to the late 1st century AD. Chinese sources report that Modu Chanyu, the supreme leader after 209 BC, founded the Xiongnu Empire.
In 209 BC, three years before the founding of Han China, the Xiongnu were brought together in a powerful confederation under a new chanyu, Modu Chanyu. This new political unity transformed them into a more formidable state by enabling formation of larger armies and the ability to exercise better strategic coordination. After their previous rivals, the Yuezhi, migrated into Central Asia during the 2nd century BC, the Xiongnu became a dominant power on the steppes of north-east Central Asia, centered on an area known later as Mongolia. The Xiongnu were also active in areas now part of Siberia, Inner Mongolia, Gansu and Xinjiang. Their relations with adjacent Chinese dynasties to the south east were complex, with repeated periods of conflict and intrigue, alternating with exchanges of tribute, trade, and marriage treaties (heqin).
The reason for creating the confederation remains unclear. Suggestions include the need for a stronger state to deal with the Qin unification of China that resulted in a loss of the Ordos region at the hands of Meng Tian or the political crisis that overtook the Xiongnu in 215 BC when Qin armies evicted them from their pastures on the Yellow River.
After forging internal unity, Modu Chanyu expanded the empire on all sides. To the north he conquered a number of nomadic peoples, including the Dingling of southern Siberia. He crushed the power of the Donghu people of eastern Mongolia and Manchuria as well as the Yuezhi in the Hexi Corridor of Gansu, where his son, Jizhu, made a skull cup out of the Yuezhi king. Modu also reoccupied all the lands previously taken by the Qin general Meng Tian.
Under Modu's leadership, the Xiongnu threatened the Han dynasty, almost causing Emperor Gaozu, the first Han emperor, to lose his throne in 200 BC. By the time of Modu's death in 174 BC, the Xiongnu had driven the Yuezhi from the Hexi Corridor, killing the Yuezhi king in the process and asserting their presence in the Western Regions.

## Han military protectorate

This is the beginning of what Millward calls the 'classical period.' In the 20th century, China changed many of the place names of Xinjiang back to the original Chinese names of 2000 years earlier. They saw this as a patriotic act restoring the greatness and borders of the Han dynasty. Millward notes that from a 'modern nationalist perspective', the Han unified the Chinese empire, at least its furthest western extents.
The Han expansion into Xinjiang is well supported by 'rich' textual sources and the material evidence, from archaeological artifacts excavated in the Taklamakan Desert and trade items across Eurasia. These point to the influence of Chinese culture and Han settlements in the region, and the exchange of luxury items between China, India, and the west lends credence to the view that Xinjiang was the center of Silk Road trade.
In 139 BCE the Emperor Wu of Han dispatched the former palace attendant Zhang Qian to form an alliance with the Yuezhi people in order to combat the Xiongnu. He was captured by the Xiongnu, and held prisoner for a decade. After his return, his knowledge of the lands of the west was the main information the Han had of this region. Between 133 BCE and 89 CE, the Han and the Xiongnu fought a series of battles, known as the Han–Xiongnu War.
In 102 BC the Han defeated Dayuan, who had not been willing to supply the Han with Ferghana horses, in the War of the Heavenly Horses. After a series of victories against the Xiongnu, the Chinese penetrated the strategic region from the Ordos and Gansu corridor as far as Lop Nor. During the 100s BCE, the Silk Road brought increasing Chinese economic and cultural influence to the region.$^{:148}$ Between 120 BCE and 60 BCE, fighting between Han and Xiongnu continued. At that time, the Tarim Basin was inhabited by various peoples, including Tocharians (in Turfan and Kucha) and Indo-Iranian Saka peoples around Kashgar and Khotan.
In 60 BC Han China established the Protectorate of the Western Regions at Wulei (烏壘; near modern Luntai) to oversee the Tarim Basin as far west as the Pamir. The Tarim Basin and Indo-European kingdoms were controlled through military colonies by the Han dynasty, but the Han "never had a foothold in Zungharia (northern Xinjiang), which the Xiongnu and the Wusun dominated for this whole period."
During Wang Mang's usurpation (8–25 CE), and the civil war in the central Han territory, the Han left the Tarim basin, and the Northern Xiongnu re-established their overlordship. At the end of the 1st century, Han China conducted several expeditions into the region, re-establishing military colonies "and bullied the Tarim city-states into renewing their vow of allegiance to Han," from 74 to 76 and 91–107. From 107 to 125 the Han left the Tarim Basin again, leaving it to the Xiongnu. From 127 to c.150 it was controlled again by the Han, whereafter the Tocharian-speaking Kushan Empire (30–375) took control of the western and northern Tarim Basin. The Kushan played a role in introducing Buddhism to the Tarim Basin and China, and in translating Buddhist texts into Chinese and other languages.

## Buddhist Kingdoms and Turkic expansion
### Buddhist Kingdoms (3rd–6th century)

After the fall of the Han dynasty (220), there was "only limited and sporadic involvement in the Tarim Basin" by the Chinese. During the third and fourth century, the region was ruled by local rulers. Local city-states such as the Kingdom of Khotan (56–1006), Kashgar (Shule Kingdom), Hotan (Yutian), Kucha (Qiuci) and Cherchen (Qiemo) controlled the western half, while the central region around Turpan was controlled by Gaochang (later known as Qara-hoja). In the 4th century, Zungharia was occupied by Rouran confederation, while the oasis cities south of Tianshan paid tribute to the Rouran. From c. 450 to 560 the Tarim Basin was controlled by the Hephthalites (White Huns), until they were defeated in 560 by the Kök Türk.

### Gokturk Khaganate and Tuyuhun (5th–7th century)

In the 5th century the Turks began to emerge in the Altay region, subservient to the Rouran. Within a century they had defeated the Rouran and established a vast Turkic Khaganate (552–581), stretching over most of Central Asia past both the Aral Sea in the west and Lake Baikal in the east. In 581 the Gokturks split into the Western Turkic Khaganate (581–657) and Eastern Turkic Khaganate (581–630), with Xinjiang coming under the western half.
Parts of southern Xinjiang were controlled by the Tuyuhun Kingdom (284–670), who established a vast empire that encompassed Qinghai, Gansu, Ningxia, northern Sichuan, eastern Shaanxi, southern Xinjiang, and most of Tibet, stretching 1,500 kilometers from east to west and 1,000 kilometers from north to south. They unified parts of Inner Asia for the first time in history, developed the southern route of the Silk Road, and promoted cultural exchange between the eastern and western territories, dominating the northwest for more than three and half centuries until it was destroyed by the Tibetan Empire. The Tuyuhun Empire existed as an independent kingdom outside China and was not included as part of Chinese historiography.

## Tang and Tibetan expansions
### Tang expeditions

Starting from the 620s and 630s, the Tang dynasty conducted a series of expeditions against the Eastern Turks. By 640, military campaigns were dispatched against the Western Turkic Khaganate, and their vassals, the oasis states of southern Xinjiang. The 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 expansion into Central Asia continued under Taizong's successor, Emperor Gaozong, who dispatched an army in 657 led by Su Dingfang against the Western Turk qaghan Ashina Helu. Ashina's defeat strengthened Tang rule in southern Xinjiang and brought the regions formerly controlled by the khaganate into the Tang empire. The military expedition included 10,000 horsemen supplied by the Uyghurs, who were close allies of the Tang. The Uyghurs had allied with the Tang ever since the dynasty supported their revolt against the reign of the Xueyantuo, a tribe of Tiele people. Xinjiang was administered through the Anxi Protectorate (安西都護府; 'Protectorate Pacifying the West') and the Four Garrisons of Anxi.
Unlike the Han dynasty, the Tang ruling house of Li had intermarriages and close affinity to the nomads of the north, due to the establishment of nomadic kingdoms in northern China after the fall of the Han Empire, and the mutual Sinification and Turkification of Turkish and Chinese elites. This affinity with the Turks may partly explain why the Tang were able to expand their influence westward into the Tarim Basin, which they ruled indirectly through protectorates and garrisons. However the relationship between Turks and Chinese was tumultuous in China, with several periods of Turk-Han conflict, and the Turkic general An Lushan had adopted a Sogdian title of nobility over the Chinese emperor title (huangdi).
For five years, Tang suzerainty extended as far west as over Samarkand and Bukhara (Uzbekistan), Kabul and Herat (Afghanistan), and even Zaranj near Iran, but in 662 Tang hegemony beyond the Pamir Mountains in modern Tajikistan and Afghanistan ended with revolts by the Turks. The Tang only retained a military foothold in Beiting.

### Tibetan expansion

Tang rule over Xinjiang and Central Asia was threatened by Tibetan expansion into the Southern Tarim. After defeating the Tang in 670, the Tang retreated eastwards "and was in full flight from its empire in Central Asia." The Tibetans subjugated Kashgar in 676-678 and retained possession until 693, when China regained control of southern Xinjiang, and retained it for the next fifty years, though under constant threat from Tibetan and Turkic forces. The Tang were not able to intervene beyond the Pamir Mountains, where Arab forces were moving into Bactria, Ferghana and Soghdiana in the early 8th century, and had no direct influence on the fights between Turks, Tibetans and Arabs for control over Central Asia. Tang outposts were repeatedly attacked by Tibetans and the Türgesh, and in 736 Tibet conquered the Pamir region. In 744 the Tang defeated the Türgesh, and drove the Tibetans out of Pamir. A few years later, war between Ferghana and Tashkent, with the Han supporting Ferghana, resulted in Arab intervention, and in the Battle of Talas (751) the Tang lost to the Abbasid Caliphate, which did not proceed further into Xinjiang.
The devastating Anshi Rebellion (755–763) ended Tang presence in the Tarim Basin, when the Tibetan Empire invaded the Tang on a wide front from Xinjiang to Yunnan, sacking the Tang capital Chang'an in 763, and taking control of the southern Tarim.

### Sinification and Turkification

According to Millward, "Tang military farms and settlements left an enduring stamp upon local culture and administration in eastern Xinjiang," also leaving "cultural traces in Central Asia and the west," and continued circulation of Chinese coins. Later Turkic empires gained prestige by associating themselves with north Chinese states established by non-Chinese nomadic people, referring to themselves as "Chinese emperor." "Khitay" was used by the Qara-Khitay, and "Tabghach" was used by the Qarakhanids. Later Arabian and Persian references to China may actually have referred to Central Asia. In Central Asia the Uyghurs viewed the Chinese script as "very prestigious" so when they developed the Old Uyghur alphabet, based on the Syriac script, they deliberately switched it to vertical like Chinese writing from its original horizontal position in Syriac.
During the Tang dynasty period, China installed Turkic garrisons along Xinjiang in their pacification policy toward western regions, but struggled to maintain control over the region due to hostile attacks from Tibetan and Turkic elites, who frequently betrayed them. One important contribution from China was large-scale paper technology, whose spread was aided by the Sogdians, who dominated commerce in Xinjiang. The Sogdians had immense cultural influence among the Turks in Xinjiang and are seen as the instigators of the An Lushan rebellion that ended Chinese rule in the region for 1000 years. After the collapse of the Uyghur Khaganate of modern-day Mongolia, Uyghur people migrated to the Tarim Basin and mixed with the Tochariansn, converted to their religion, and adopted their method of oasis agriculture.

## Uyghur Khaganate (8th–9th century)

In 744 the Uyghur Khaganate (744–840) was formed as a confederation of nine Uyghur clans. The Tang allied with the Uyghur Bayanchur Khan to suppress the An Lushan rebellion, An Lushan himself being from Soghdian-Turkish descent. For their aid, the Tang sent 20,000 rolls of silk and bestowed them with honorary titles. In addition the horse trade was fixed at 40 rolls of silk for every horse and Uyghurs were given "guest" status while staying in Tang China. While the Tang thereafter lost their military power in the Tarim, the Uyghurs pressed for control of the eastern basin and Gansu.
In 762 Tengri Bögü planned to invade the Tang with 4,000 soldiers, but after negotiations switched sides, and assisted them in defeating the An Lushan rebels at Luoyang. For their aid, the Tang was forced to pay 100,000 pieces of silk to get the Uyghurs to leave. During the campaign Khagan Tengri Bögü encountered Persian Manichaean priests, and converted Manichaeism, adopting it as the official religion of the Uyghur Khaganate.
In 779 Tengri Bögü, advised by Sogdian courtiers, planned to invade Tang China, but was killed by his uncle Tun Bagha Tarkhan, who opposed this plan and ascended the throne. During his reign Manichaeism was suppressed, but his successors restored it as the official religion.
In 790 the Uyghurs and Tang forces were defeated by the Tibetans at Ting Prefecture (Beshbalik). In 803 the Uyghurs captured Qocho. In 808 the Uyghurs seized Liang Prefecture from the Tibetans. In 822 the Uyghurs sent troops to help the Tang in quelling rebels. The Tang refused the offer but had to pay them 70,000 pieces of silk to go home.
In 840, the Kyrgyz tribe invaded from the north with a force of around 80,000 horsemen, destroying the Uyghur capital at Ordu Baliq and other cities, and killing the Uyghur Khagan, Kürebir (Hesa). The last legitimate khagan, Öge, was assassinated in 847, having spent his 6-year reign in fighting the Kyrgyz and the supporters of his rival Ormïzt, a brother of Kürebir. After the fall of the Uyghur Khaganate, the Uyghurs migrated south and established the Ganzhou Uyghur Kingdom in modern Gansu and the Kingdom of Qocho near modern Turpan. The Uyghurs in Qocho converted to Buddhism, and, according to Mahmud al-Kashgari, were "the strongest of the infidels" while the Ganzhou Uyghurs were conquered by the Tangut people in the 1030s.

## Local kingdoms (9th century)

Both Tibet and the Uyghur Khanate declined in the mid-9th century. There were three main regional kingdoms that vied for power in and around Xinjiang: the Persian Buddhist Kingdom of Khotan (56–1006); the Buddhist Uyghur Qocho (Kara-Khoja), founded by Uyghurs who migrated southwards; and the Turkic Muslim Kara-Khanid, which eventually conquered the whole Tarim Basin. The Turkic Qarakhanid and Uyghur Qocho Kingdoms were both states founded by invaders, while the native populations of the region were Iranian, Tocharian, Chinese (Qocho), and Indian. They married and mixed with the Turkic invaders.

### Khotan

Iranian Saka peoples originally inhabited Yarkand and Kashgar in ancient times. They formed the Buddhist Kingdom of Khotan (56–1006). Its ruling family used Indian names and the population were devout Buddhists. The Buddhist entitles of Dunhuang and Khotan had a tight-knit partnership, with intermarriage between Dunhuang and Khotan's rulers and Dunhuang's Mogao grottos and Buddhist temple funded and sponsored by the Khotan royals, depicted in the Mogao grottoes. In the Mogao caves, the rulers of Khotan hired artists to paint divine figures alongside the Khotans to give them strength against their Turkic rivals.

### Kingdom of Qocho (Kara-Khoja)

In 840, after the Uyghur Khaganate in Mongolia had been conquered by the Kirghiz, Uyghurs migrated southwards into the Tarim Basin, to Kara-khoja and to Beshbalik near today's Turpan and Urumqi. They formed the Western Uyghur Kingdom Qocho (Kara-Khoja Kingdom), which remained in eastern Xinjiang until the 14th century, though it was subject to various overlords during that time, including the Karakhanid. The Uyghur state in eastern Xinjiang was initially Manicheaean, but later converted to Buddhism. Analysis of Tarim mummies confirms that Turkic-speaking Uighur began migrating to the region by the 9th century (842 CE) from Central Asia.
Iranian monks maintained a Manichaean temple in the Kingdom, but the Tang military presence in Qocho and Turfan also left traces upon the Buddhist Uyghur Kingdom of Qocho. The Persian Hudud al-'Alam uses the name "Chinese town" to refer to Qocho, the capital of the Uyghur kingdom, and Tang names were kept in use for more than 50 Buddhist temples, with Emperor Tang Taizong's edicts stored in the "Imperial Writings Tower," and Chinese dictionaries like Jingyun, Yuian, Tang yun, and da zang jing (Buddhist scriptures) stored inside the Buddhist temples. The Turfan Buddhist Uighurs of the Kingdom of Qocho continued to produce the Chinese Qieyun rime dictionary and developed their own pronunciations of Chinese characters, left over from the Tang influence over the area.
The modern Uyghur linguist Abdurishid Yakup pointed out that the Turfan Uyghur Buddhists studied the Chinese language and used Chinese books like Qianziwen (the thousand character classic) and Qieyun *(a rime dictionary).

### Kara-Khanids

Around the 9th century the Kara-Khanid Khanate rose from a confederation of Turkic tribes living in Zhetysu (modern Kazakhstan), Western Tian Shan (modern Kyrgyzstan), and Western Xinjiang (Kashgaria). They later occupied Transoxania. The Karakhanids were made up mainly of the Karluks, Chigils and Yaghma tribes. The capital of Karakhanid Khanate was Balasaghun on the Chu River and then later Samarkand and Kashgar.
The Kara-Khanids converted to Islam. Their administrative language was Middle Chinese, though Persian, Arabic, and Turkic were also spoken.
In a series of wars, the Karakhanid conquered Khotan. In 966, Sultan Satuq Bughra Khan of the Kara-Khandids converted to Islam after contacts with the Muslim Samanid Empire. He then launched Karakhanid invasions of Khotan cities east of Kashgar.
Halfway into the 10th century, Karakhanid ruler Musa again attacked Khotan. The Karakhanid general Yusuf Qadir Khan finally conquered Khotan around 1006, thereby beginning the Turkification and Islamicization of the region.
After Yusuf's conquest of Altishahr, he adopted the title "King of the East and China".
Bughra Khan was overthrown by his nephew Satuq. The Arslan Khans were also toppled and Balasaghun taken by Satuq, with the conversion of the Qarakhanid Turk population to Islam following Satuq's accession to power. With the spread of Islam the Qarakhanid Turks conquered Transoxiana from the Arabs and the Samanids from the Persians.

### Islamization of Xinjiang

The majority of the Turks converted to Islam in the mid 10th century under Sultan Satuq Bughra Khan when they established the Kara-Khanid Khanate. Satuq Bughra Khan and his son directed endeavors to proselytize Islam among the Turks and engage in military conquests. Dunhuang's Cave 17, which contained Khotanese literary works, was shut possibly after its caretakers heard that Khotan's Buddhist buildings were being razed by the Muslims. Buddhism then ceased to exist in Khotan.
The Imams who helped Yusuf were assassinated by the Buddhists prior to the last Muslim victory. So Yusuf assigned Khizr Baba, born in Khotan but whose mother originated from Western Turkestan's Mawarannahr, to take care of the shrine of the four Imams at their tomb. Due to the Imam's death in battle and burial in Khotan, Altishahr, and despite their foreign origins, the Kara-khanids are viewed as local saints by the current Hui people in the region.
The Karakhanid also converted the Uyghurs. Prominent Qarakhanids such as Mahmud Kashghari hold a high position among modern Uyghurs. Kashghari viewed the least Persianified Turkic dialects as the "purest" and "the most elegant".

### Western Liao (1124–1218)

In 1124 the Khitan people, nomadic people from northeast Asia, led by Yelü Dashi and the royal family marched from Kedun to establish the Qara Khitai in Central Asia. The migration included Han Chinese, Bohai, Jurchen, Mongol tribes, the Xiao consort clan, etc. Some Khitans migrated into western areas even before. In 1132, further remnants of the Liao dynasty from Manchuria and North China entered Xinjiang, fleeing the onslaught of the Jurchens into North China. They established an exile regime, the Qara Khitai, which became overlord over both Kara-Khanid held and Uyghur held parts of the Tarim Basin for the next century. During the Liao, many Han Chinese lived in Kedun, situated in present-day Mongolia.
In 1208, a Naiman prince named Kuchlug fled his homeland after being defeated by the Mongols. He fled westward to the Qara Khitai, where he became an advisor. However, he rebelled three years later and usurped the throne of Qara Khitai. His regime proved to be short-lived however because the Mongols under Genghis Khan would soon invade Central Asia including the Qara Khitai.
The Qara-Khitai empire retained Chinese characteristics in their state to appeal to the Muslim Central Asians and legitimize Khitai rule. This was because China had a good reputation among the Muslims, who viewed China as extremely civilized, with their unique script (hanzi), expert artisans, legal system, justice and religious tolerance. These were among the virtues attributed to the Chinese despite their idol worship. At the time, the Turkic, Arab, Byzantine, Indian rulers, and the Chinese emperor were known as the world's "five great kings." The memory of Tang China was so engraved into the Muslim perception that they continued to view China through the lens of the Tang. Anachronisms appeared in Muslim writings even after the end of the Tang.

## Mongol-Turkic Khanates (12th–18th century)
### Mongol Empire and Chagatai Khanate (1225–1340s)

In 1206 Genghis Khan unified the Mongol and Turkic tribes on the Mongolian plateau, establishing the Mongol Empire (1206–1368). In 1209, after they began their advance west, the Uyghur state in the Turfan-Urumqi area offered its allegiance to the Mongol Empire. It paid taxes and sent troops to fight for the Mongol imperial effort and work as civil servants. In return, the Uyghur rulers retained control of their kingdom. In 1218, Genghis captured Qara Khitai.
After the death of Möngke Khan in 1259, the Mongol Empire was divided into four khanates. In 1271 the Yuan dynasty (1271–1368) was founded by Kublai Khan and based in modern-day Beijing, but lost control of the Tarim Basin and Zungharia to Ariq Böke, ruler of Mongolia.

### Chagatai Khanate (1225–1340s)

The Chagatai Khanate was a Mongol and later Turkicized khanate that comprised the lands ruled by Chagatai Khan, second son of Genghis Khan, and his descendants and successors. Initially it was a part of the Mongol Empire, but it became a functionally separate khanate with the fragmentation of the Mongol Empire after 1259. The Chagatai Khanate recognized the nominal supremacy of the Yuan dynasty in 1304, but became split into two parts in the mid-14th century: the Western Chagatai Khanate and the Moghulistan Khanate.
Chagatai's grandson Alghu (1260–1266) took advantage of the Toluid Civil War (1260-1264) between Kublai Khan and Ariq Böke by revolting against the latter, seizing new territories and gaining the allegiance of the Great Khan's authorities in Transoxiana. Most of the Chagatayids first supported Kublai but in 1269 they joined forces with the House of Ögedei.
After the Kaidu–Kublai war (1268–1301) between the Yuan and Chagatai Khanate (led by Kaidu), most of Xinjiang was controlled by the Chagatai Khanate (1225–1340s). This lasted until the mid-14th century, when Chagatai split into the Western Chagatai Khanate (1340s–1370) and Moghulistan (1340s–1680s), also called the Eastern Chagatai Khanate.
Buddhism survived in Uyghurstan (Turfan and Qocho) during the Ming dynasty (1368 to 1644).
The Buddhist Uyghurs of the Kingdom of Qocho and Turfan were converted to Islam by conquest during a holy war at the hands of the Muslim Chagatai Khizr Khwaja, Khan of Moghulistan during the Chagatai Khanate (reign 1390–1399).
Kara Del (c. 1389–1513) was a Mongolian-ruled and Uighur-populated Buddhist kingdom. The Muslim Chagatai Khan Mansur invaded and "used the sword" to make the population convert to Islam.
After being converted to Islam, the descendants of the previously Buddhist Uyghurs in Turfan failed to retain memory of their ancestral legacy and falsely believed that the "infidel Kalmuks" (Dzungars) were the ones who built Buddhist monuments in their area.
During the Mongol Empire, more Han Chinese moved into Besh Baliq, Almaliq and Samarqand in Central Asia to work as artisans and farmers. The Liao Chinese traditions helped the Qara Khitai avoid Islamization. They continued to use Chinese as the administrative language.

### Moghulistan (Eastern Chagatai Khanate) (1462–1680s)

After the death of Qazan Khan in 1346, the Chagatai Khanate, which embraced both East and West Turkestan, was divided into Transoxiana (west) and Moghulistan (east, controlling parts of Xinjiang). Power in the western half devolved into the hands of several tribal leaders, most notably the Qara'unas. Khans appointed by the tribal rulers were mere puppets.
In the east, Tughlugh Timur (1347–1363), a Chaghataite adventurer, defeated the nomadic Mongols and converted to Islam. During his reign (until 1363), the Moghuls converted to Islam and slowly Turkified. In 1360, and again in 1361, Timur invaded the western half in the hope that he could reunify the khanate. At their height, the Chaghataite domains extended from the Irtysh River in Siberia down to Ghazni in Afghanistan, and from Transoxiana to the Tarim Basin.
Moghulistan occupied the settled lands of Eastern Turkestan as well as nomad lands north of Tengri tagh. The settled lands were known at the time as Manglai Sobe or Mangalai Suyah, which translates as "Shiny Land" or "Advanced Land that faced the Sun." These included west and central Tarim oasis-cities, such as Khotan, Yarkand, Yangihisar, Kashgar, Aksu, and Uch Turpan; and hardly involved eastern Tangri Tagh oasis-cities, such as Kucha, Karashahr, Turpan and Kumul, where a local Uyghur administration and Buddhist population still existed. The nomadic areas comprised present-day Kyrgyzstan and parts of Kazakhstan, including Jettisu, the area of seven rivers.
Moghulistan existed around 100 years and then split into two parts: 1) Yarkand state (mamlakati Yarkand), with its capital at Yarkand, which embraced all the settled lands of Eastern Turkestan; and 2) nomadic Moghulistan, which embraced the nomad lands north of Tengri Tagh. The founder of Yarkand was Mirza Abu-Bakr, who was from the Dughlat tribe. In 1465, he raised a rebellion, captured Yarkand, Kashgar, and Khotan, and declared himself an independent ruler, successfully repelling attacks by the Moghulistan rulers Yunus Khan and his son Akhmad Khan (or Ahmad Alaq, named Alach, "Slaughterer", for his war against the Kalmyks).
Dughlat amirs had ruled the country that lay south of the Tarim Basin from the middle of the thirteenth century, on behalf of Chagatai Khan and his descendants, as their satellites. The first Dughlat ruler, who received lands directly from the hands of Chagatai, was amir Babdagan or Tarkhan. The capital of the emirate was Kashgar, and the country was known as Mamlakati Kashgar. Although the emirate, representing the settled lands of Eastern Turkestan, was formally under the rule of the Moghul khans, the Dughlat amirs often tried to put an end to that dependence, and raised frequent rebellions, one of which resulted in the separation of Kashgar from Moghulistan for almost 15 years (1416–1435). Mirza Abu-Bakr ruled Yarkand for 48 years.

### Yarkand Khanate (1514–1705)

In May, 1514, Sultan Said Khan, grandson of Yunus Khan (ruler of Moghulistan between 1462 and 1487) and third son of Ahmad Alaq (ruler of the Turpan Khanate), made an expedition against Kashgar from Andijan with only 5000 men, and having captured the Yangi Hissar citadel, that defended Kashgar from south road, took the city, dethroning Mirza Abu-Bakr. Soon after, other cities of Eastern Turkestan — Yarkant, Khotan, Aksu, and Uch Turpan — joined him, and recognized Sultan Said Khan as ruler, creating a union of six cities, called Altishahr. Sultan Said Khan's sudden success is considered to be contributed to by the dissatisfaction of the population with the tyrannical rule of Mirza Abu-Bakr and the unwillingness of the dughlat amirs to fight against a descendant of Chagatai Khan, deciding instead to bring the head of the slain ruler to Sultan Said Khan. This move put an end to almost 300 years of rule (nominal and actual) by the Dughlat Amirs in the cities of West Kashgaria (1219–1514). He made Yarkand the capital of a state, "Mamlakati Yarkand" which lasted until 1678.

### The Khojah Kingdom

In the 17th century, the Dzungars (Oirats, Kalmyks) established an empire over much of the region. Oirats controlled an area known as Grand Tartary or the Kalmyk Empire to Westerners, which stretched from the Great Wall of China to the Don River, and from the Himalayas to Siberia. A Sufi master Khoja Āfāq defeated Saidiye kingdom and took the throne at Kashgar with the help of the Oirat (Dzungar) Mongols. After Āfāq's death, the Dzungars held his descendants hostage. The Khoja dynasty rule in the Altishahr (Tarim Basin) region lasted until 1759.

## Dzungar Khanate

The Mongolian Dzungar (also Zunghar; Mongolian: Зүүнгар Züüngar) was the collective identity of several Oirat tribes that formed and maintained one of the last nomadic empires, the Dzungar Khanate. The Dzungar Khanate covered the area called Dzungaria and stretched from the west end of the Great Wall of China to present-day eastern Kazakhstan, and from present-day northern Kyrgyzstan to southern Siberia. Most of this area was only renamed "Xinjiang" by the Chinese after the fall of the Dzungar Empire. It existed from the early 17th century to the mid-18th century.
The Turkic Muslim sedentary people of the Tarim Basin were originally ruled by the Chagatai Khanate while the nomadic Buddhist Oirat Mongol in Dzungaria ruled over the Dzungar Khanate. The Naqshbandi Sufi Khojas, descendants of Muhammad, had replaced the Chagatayid Khans as the ruling authority of the Tarim Basin in the early 17th century. There was a struggle between two factions of Khojas, the Afaqi (White Mountain) faction and the Ishaqi (Black Mountain) faction. The Ishaqi defeated the Afaqi, which resulted in the Afaqi Khoja inviting the 5th Dalai Lama, the leader of the Tibetan Buddhists, to intervene on his behalf in 1677. The 5th Dalai Lama then called upon his Dzungar Buddhist followers in the Dzungar Khanate to act on this invitation. The Dzungar Khanate then conquered the Tarim Basin in 1680, setting up the Afaqi Khoja as their puppet ruler.
Khoja Afaq asked the 5th Dalai Lama when he fled to Lhasa to help his Afaqi faction take control of the Tarim Basin (Kashgaria). The Dzungar leader Galdan was then asked by the Dalai Lama to restore Khoja Afaq as ruler of Kashgararia. Khoja Afaq collaborated with Galdan's Dzungars when the Dzungars conquered the Tarim Basin from 1678 to 1680 and set up the Afaqi Khojas as puppet client rulers. The Dalai Lama blessed Galdan's conquest of the Tarim Basin and Turfan Basin.
67,000 patman (each patman is 4 piculs and 5 pecks) of grain 48,000 silver ounces were forced to be paid yearly by Kashgar to the Dzungars and cash was also paid by the rest of the cities to the Dzungars. Trade, milling, and distilling taxes, corvée labor, saffron, cotton, and grain were also extracted by the Dzungars from the Tarim Basin. Every harvest season, women and food had to be provided to Dzungars when they came to extract the taxes from them.
When the Dzungars levied the traditional nomadic Alban poll tax upon the Muslims of Altishahr, the Muslims viewed it as the payment of jizyah (a tax traditionally taken from non-Muslims by Muslim conquerors).
After being converted to Islam, the descendants of the previously Buddhist Uyghurs in Turfan failed to retain memory of their ancestral legacy and falsely believed that the "infidel Kalmuks" (Dzungars) were the ones who built Buddhist monuments in their area.

## Qing dynasty
### Dzungar–Qing Wars

The Dzungars lost control of Dzungaria and the Tarim Basin to the Manchu Qing dynasty as a result of the Dzungar–Qing Wars (1687–1757). As a result of the Dzungars’ control of the Silk Road trade routes linking Europe and East Asia, they posed a strategic problem for the Qing dynasty. After the Treaty of Nerchinsk guaranteed that the Russian Empire would not ally with the Dzungars, the Kangxi Emperor ordered an invasion of Xinjiang. The Qing military defeated the Dzungars and killed Galdan at the Battle of Jao Modo in 1696. However, a 1732 campaign to complete the conquest led by Yue Zhongqi ended in disaster, killing four-fifths of Qing combatants and nearly all the officers involved. The Yongzheng Emperor executed the remaining commanders, including Yue, for corruption and would not send another invasion for the rest of his reign.
Between 1755 and 1760 the Qing Qianlong Emperor and the Qing dynasty's Eight Banners finally conquered the Dzungarian Basin and the Tarim Basin, bringing the two separate regions, respectively north and south of the Tianshan mountains, under his rule as Xinjiang. The south was inhabited by Turkic Muslims (Uyghurs) and the north by Dzungar Mongols, also called "Eleuths" or "Kalmyks".
In 1755, the Qing Empire attacked Ghulja, and captured the Dzungar Khan. Over the next two years, the Manchus and Mongol armies of the Qing destroyed the remnants of the Dzungar Khanate, and attempted to divide the Xinjiang region into four sub-Khanates under four chiefs. Similarly, the Qing made members of a clan of Sufi shaykhs known as the Khojas, rulers in the western Tarim Basin, south of the Tianshan Mountains.
After Oirat nobel Amursana's request to be declared Dzungar khan went unanswered, he led a revolt against the Qing. Qing attention became temporarily focused on the Khalka prince Chingünjav, a descendant of Genghis Khan, who between the summer of 1756 and January 1757 mounted the most serious Khalka Mongol rebellion against the Qing until its demise in 1911. Before dealing with Amursana, the majority of Qianlong's forces were reassigned to ensure stability in Khalka until Chingünjav's army was crushed by the Qing in a ferocious battle near Lake Khövsgöl in January, 1757. After the victory, Qianlong dispatched additional forces to Ili where they quickly routed the rebels. Amursana escaped for a third time to the Kazakh Khanate, but not long afterwards Ablai Khan pledged tributary status to the Chinese, which meant Amursana was no longer safe. Over the next two years, Qing armies destroyed the remnants of the Dzungar khanate. The Qing Manchu Bannermen carried out the Dzungar genocide (1755-1758) on the native Dzungar Oirat Mongol population, nearly wiping them from existence and depopulating Dzungaria.
The Turkic Muslims of the Turfan and Kumul Oases then submitted to the Qing dynasty of China, and the Qing accepted the rulers of Turfan and Kumul as Qing vassals.
The Qing freed the Afaqi Khoja leader Burhān al-Dīn Khoja and his brother Jahān Khoja from their imprisonment by the Dzungars, and appointed them to rule as Qing vassals over the Tarim Basin. The Khoja brothers decided to renege on this deal, igniting the revolt of the Altishahr Khojas (1757–1759), and declaring themselves as independent leaders of the Tarim Basin. The Qing and the Turfan leader Emin Khoja crushed their revolt, and Manchu Qing then took control of both Dzungaria and the Tarim Basin by 1759. Bannermen led by Zhaohui defeated the last remaining Dzungar forces and captured the cities of Kashgar and Yarkand. After the conquest, the emperor honored Zhaohui with the unprecedented gesture of exiting the Beijing city gates and personally greeting his forces. For almost one hundred years, the Āfāqi Khojas waged numerous military campaigns as a part of the Āfāqī Khoja Holy War in an effort to retake Altishahr from the Qing.
The Qing tried to consolidate their authority by settling Chinese emigrants, together with a Manchu Qing garrison. The Qing put the whole region under the military rule of a General of Ili, headquartered at the fort of Huiyuan (the so-called "Manchu Kuldja", or Yili), 30 km (19 mi)west of Ghulja (Yining). The Qing court also kept a monopoly over gold and jade mining in the region. At the same time, the Qing dynasty allowed the local population autonomy over their customs and religion. Local Islamic civil and religious leaders were given titles and salaried posts in the new dynasty.
The Ush rebellion in 1765 by Uyghurs against the Manchus occurred after Uyghur women were gang raped by the servants and son of Manchu official Su-cheng. It was said that Ush Muslims had long wanted to sleep on [Sucheng and son's] hides and eat their flesh. because of the rape of Uyghur Muslim women for months by the Manchu official Sucheng and his son. The Manchu Emperor ordered that the Uyghur rebel town be massacred, the Qing forces enslaved all the Uyghur children and women and slaughtered the Uyghur men. Manchu soldiers and Manchu officials regularly having sex with or raping Uyghur women caused massive hatred and anger by Uyghur Muslims to Manchu rule. The invasion by Jahangir Khoja was preceded by another Manchu official, Binjing who raped a Muslim daughter of the Kokan aqsaqal from 1818 to 1820. The Qing sought to cover up the rape of Uyghur women by Manchus to prevent anger against their rule from spreading among the Uyghurs.
The Uyghur Muslim Sayyid and Naqshbandi Sufi rebel of the Afaqi suborder, Jahangir Khoja was sliced to death (Lingchi) in 1828 by the Manchus for leading a rebellion against the Qing.

### Dungan Revolt (1862–1877) and Qing reconquest

Yakub Beg ruled Kashgaria at the height of the Great Game era when the British, Russian, and Manchu Qing empires were all vying for Central Asia. Kashgaria extended from the capital Kashgar in south-western Xinjiang to Ürümqi, Turfan, and Hami in central and eastern Xinjiang more than a thousand kilometers to the north-east, including a majority of what was known at the time as Chinese Turkestan or East Turkestan.
They remained under his rule until December 1877 when General Zuo Zongtang (also known as General Tso) reconquered the region in 1877 for Qing China. In 1881, Qing recovered the Gulja region through diplomatic negotiations in the Treaty of Saint Petersburg (1881).
In 1884, Qing China renamed the conquered region, established Xinjiang (新疆; 'new frontier') as a province, formally applying onto it the political system of China proper. The two previously separate regions,
* Dzungaria, known as Zhunbu (準部), Tianshan Beilu (天山北路; 'Northern March'),
* the Tarim Basin, which had been known as Altishahr, Huibu (Muslim region), Huijiang (Muslim-land) or "Tianshan Nanlu" (天山南路; 'Southern March'),
were combined into a single province called Xinjiang in 1884, after Russia recognized Qing China's western borders with the Treaty of Saint Petersburg. Before this, there was never one administrative unit in which North Xinjiang (Zhunbu) and Southern Xinjiang (Huibu) were integrated together. Dzungaria's alternate name is 北疆 (Běijiāng; 'North Xinjiang') and Altishahr's alternate name is 南疆 (Nánjiāng; 'South Xinjiang').
After Xinjiang was converted into a province by the Qing, the provincialization and reconstruction programs initiated by the Qing resulted in the Chinese government helping Uyghurs migrate from southern Xinjiang to other areas of the province, like the area between Qitai and the capital, formerly nearly completely inhabited by Han Chinese, and other areas like Urumqi, Tacheng (Tabarghatai), Yili, Jinghe, Kur Kara Usu, Ruoqiang, Lop Nor, and the Tarim River's lower reaches. It was during Qing times that Uyghurs were settled throughout all of Xinjiang, from their original home cities in the western Tarim Basin.

### Qing governance

The Qing dynasty was founded by the Manchu people, one of the Tungusic peoples, whose language is related to Turkic and Mongolic. They identified their state as "China" (中國), and referred to it as "Dulimbai Gurun" in Manchu. The Qing equated the lands of the Qing state (including present-day Manchuria, Dzungaria in Xinjiang, Mongolia, and other areas) as "China" in both the Chinese and Manchu languages, defining China as a multi-ethnic state. The Qianlong Emperor compared his achievements with that of the Han and Tang ventures into Central Asia to gain prestige and legitimization.
Qianlong's conquest of Xinjiang was driven by his mindfulness of the examples set by the Han and Tang Qing scholars who wrote the official Imperial Qing gazetteer for Xinjiang made frequent references to the Han and Tang era names of the region. The Qing conqueror of Xinjiang, Zhao Hui, is ranked for his achievements with the Tang dynasty General Gao Xianzhi and the Han dynasty Generals Ban Chao and Li Guangli.
Both Han and Tang models for ruling Xinjiang provided some precedence for the Qing, but their style of governance mostly resembled that of nomadic powers like the Qara Khitay, and the centralized European and Russian empires.
The Qing portrayed their conquest of Xinjiang in official works as a continuation and restoration of the Han and Tang accomplishments in the region, mentioning the previous achievements of those dynasties. The Qing justified their conquest by claiming that the Han and Tang era borders were being restored, and identifying the Han and Tang's grandeur and authority with the Qing.
Many Manchu and Mongol Qing writers who wrote about Xinjiang did so in the Chinese language, from a culturally Chinese point of view. Han and Tang era stories about Xinjiang were recounted, and ancient Chinese places names were reused and circulated. Han and Tang era records and accounts of Xinjiang were the only writings on the region available to Qing era Chinese in the 18th century and needed to be replaced with updated accounts by the literati.

#### Migration policies

After the Qing dynasty defeated the Dzungar Oirat Mongols, the Qing settled Han, Hui, Manchus, Xibe, and Taranchis (Uyghurs) from the Tarim Basin, into Dzungaria. Han Chinese criminals and political exiles were exiled to Dzungaria, such as Lin Zexu. Hui Muslims and Salar Muslims belonging to banned Sufi orders like the Jahriyya were also exiled to Dzhungaria. After crushing the 1781 Jahriyya rebellion, the Qing exiled Jahriyya adherents too.
Han and Hui merchants were initially only allowed to trade in the Tarim Basin. Han and Hui settlement in the Tarim Basin was banned until the 1830 Muhammad Yusuf Khoja invasion, after which the Qing rewarded the merchants for fighting off Khoja by allowing them to settle down.
In 1870, there were many Chinese of all occupations living in Dzungaria, and they were well settled in the area, while in Turkestan (Tarim Basin) there were only a few Chinese merchants and soldiers in several garrisons among the Muslim population.
At the start of the 19th century, 40 years after the Qing reconquest, there were around 155,000 Han and Hui Chinese in northern Xinjiang and somewhat more than twice that number of Uyghurs in southern Xinjiang.

#### Education

Mosques ran the schools (or maktab مكتب in Arabic). Madrasas and mosques were where most education took place. The Madrasas taught poetry, logic, syntax, Arabic grammar, Islamic law, the Quran, but not much history.
The Jadidists Turkic Muslims from the Russian Empire spread new ideas on education. Between the 1600s and 1900s many Turki language tazkirah texts were written.
Indian-produced literature in the Persian language was exported to Kashgar.
Chinese books were also popular among Uyghurs. Kashgar's earliest printed work was translated by Johannes Avetaranian. He helped in producing the Turki language version of the Shunzhi Emperor's work. The "Sacred Edict" by the Kangxi Emperor was released in both Turki and Chinese when printed in Xinjiang by Zuo Zongtang. One of the Shunzhui Emperor's literary works was rendered into Turki and published in Kashgar by Nur Muhammad. Various attempts at publishing and printing were attempted.

#### Population

Starting 1760, the Qing dynasty gave large amounts of land to Chinese Hui Muslims and Han Chinese who settled in Dzungaria, while Turkic Muslim Taranchis were also moved into Dzungaria in the Ili region from Aqsu. In the following 60 years, the population of the Tarim Basin swelled to twice its original size during Qing rule.
No permanent settlement was allowed in the Tarim Basin, with only merchants and soldiers being allowed to stay temporarily.
To the 1830s after Jahangir's invasion, Altishahr was open to Han and Hui settlement. Then 19th century rebellions caused the Han population to drop. The demonym "East Turkestan" was used for the area consisting of Uyghuristan (Turfan and Hami) in the northeast and Altishahr or Kashgaria in the southwest.
Various estimates were given by foreign visitors on the entire region's population.
| Year | Population | Notes and sources |
| Beginning of Qing c.1650 | 260K (Altishahr) | the population was concentrated more towards Kucha's western region |
| 1900 | 1.015, 1.2, or 2.5M | Kuropatkin, Forsyth, Grennard; other estimates show 300K living in Alitshahr; Uyghuristan in the east had 10% while Kashgaria had 70% of the population. |
| 1920 | 1.5M | Percy Sykes: Almost entirely confined to oases, chiefly Kashgar 300K, Yangi Shahr 200K, Yarkand 200K, and Aksu and Khotan each with 190K inhabitants. The population may be grouped into " settled " and " nomadic," with a small semi-nomadic division. The nomads, together with the semi-nomads, do not aggregate more than 125K in all. |
| 1922 | 2-3, or 5M | Yang Zengxin |
| 1931 | 6-8M | |
| 1933+ | 2,900,173 Uyghurs, ?? Han, ?? other | |
| 1941 | 3,730,000 | Toops: 65,000 Kirghiz, 92,000 Hui, 326,000 Kazakh, 187,000 Han, and 2,984,000 Uyghur 3,439,000 of which were Muslims; 2,941,000 of those Muslims were Uyghurs (1940s) Jean Bowie Shor wrote that there were 3,000,000 Uigurs and gave 3,500,000 as the total number of residents in Xinjiang. |
| 1949 | 4,334,000 | Hoppe |

## Republic of China and East Turkistan Republics (1912–1949)

In 1912 the Qing dynasty was replaced by the Republic of China. Yuan Dahua, the last Qing governor of Xinjiang, fled to Siberia. One of his subordinates Yang Zengxin, acceded to the Republic of China in March of the same year, and maintained control of Xinjiang during the Warlord Era until his assassination in 1928.
The name "Altishahr and Zungharia", "Altisheher-Junghar", "Altishähär-Junghariyä" were used to refer to the region.
The ROC era in Xinjiang saw the rise of East Turkestan independence movements.
During Stalinist rule in the Soviet Union, Central Asian Muslim nomads fled Soviet Central Asia for Xinjiang due to forced sedentarization, collectivization, and the Kazakh famine of 1930–1933. During the Second Sino-Japanese War, Joseph Stalin feared that Soviet refugees in China would side with the Japanese Empire, re-infiltrate the country to stage a rebellion in support of an Imperial Japanese Army offensive into Siberia and Central Asia, and become collaborators. As a result, the Soviet government supported the warlord Sheng Shicai's rule in the province, sending technical advisors and NKVD agents to support his regime. After the Japanese invasion of China in 1937, Sheng killed thousands in a purge assisted by the NKVD, and the Soviet Politburo's fears of an encirclement of the Soviet Union by Japan, Poland, and Nazi Germany contributed to the Great Purge in the Soviet Union itself.

### Oirat rebellions

Legends grew and prophecies circulated among the remaining Oirats that Amursana had not died after he fled to Russia, but was alive and would return to his people to liberate them from Manchu Qing rule and restore the Oirat nation.
The Oirat Kalmyk Ja Lama claimed to be a grandson of Amursana and then claimed to be a reincarnation of Amursana himself, preaching anti-Manchu propaganda in western Mongolia in the 1890s and calling for the overthrow of the Qing dynasty. Ja Lama was arrested and deported several times. However, in 1910 he returned to the Oirat Torghuts in Altay (in Dzungaria), and in 1912 he helped the Outer Mongolians mount an attack on the last Qing garrison at Kovd, where the Manchu Amban was refusing to leave and fighting the newly declared independent Mongolian state. The Manchu Qing force was defeated and slaughtered by the Mongols after Khovd fell.
Ja Lama told the Oirat remnants in Xinjiang: "I am a mendicant monk from the Russian Tsar's kingdom, but I am born of the great Mongols. My herds are on the Volga river, my water source is the Irtysh. There are many hero warriors with me. I have many riches. Now I have come to meet with you beggars, you remnants of the Oirats, in the time when the war for power begins. Will you support the enemy? My homeland is Altai, Irtysh, Khobuk-sari, Emil, Bortala, Ili, and Alatai. This is the Oirat mother country. By descent, I am the great-grandson of Amursana, the reincarnation of Mahakala, owning the horse Maralbashi. I am he whom they call the hero Dambijantsan. I came to move my pastures back to my own land, to collect my subject households and bondservants, to give favour, and to move freely."
Ja Lama built an Oirat fiefdom centered on Kovd, he and fellow Oirats from Altai wanted to emulate the original Oirat empire and build another grand united Oirat nation from the nomads of western China and Mongolia, but was arrested by Russian Cossacks and deported in 1914 on the request of the Mongolian government after the local Mongols complained of his excesses, and out of fear that he would create an Oirat separatist state and divide them from the Khalkha Mongols. Ja Lama returned in 1918 to Mongolia and resumed his activities and supported himself by extorting passing caravans, but was assassinated in 1922 on the orders of the new Communist Mongolian authorities under Damdin Sükhbaatar.
Mongols have at times advocated for the historical Oirat Dzungar Mongol area of Dzungaria in northern Xinjiang to be annexed to the Mongolian state in the name of Pan-Mongolism.
In 1918 the part Buryat Mongol Transbaikalian Cossack Ataman Grigory Semyonov declared a "Great Mongol State" and had designs to unify the Oirat Mongol lands, portions of Xinjiang, Transbaikal, Inner Mongolia, Outer Mongolia, Tannu Uriankhai, Khovd, Hu-lun-pei-erh and Tibet into one.
The Buryat Mongol Agvan Dorzhiev tried advocating for Oirat Mongol areas like Tarbagatai, Ili, and Altai to get added to the Outer Mongolian state. Out of concern that China would be provoked, this proposed addition of the Oirat Dzungaria to the new Outer Mongolian state was rejected by the Soviets.
Uyghur Muslims rioted against Indian Hindu traders when the Hindus attempted to practice their religious affairs in public. They Uyghurs also attacked the Swedish Christian mission in 1907.
An anti-Christian mob broke out among the Muslims in Kashgar against the Swedish missionaries in 1923.
In the name of Islam, the Uyghur leader Abdullah Bughra violently physically assaulted the Yarkand-based Swedish missionaries and would have executed them, except they were only banished due to the British Aqsaqal's intercession in their favor.
During the 1930s Kumul Rebellion in Xinjiang, Buddhist murals were deliberately vandalized by Muslims.

### Xinjiang wars (1933–1945)
#### First East Turkistan Republic

Following insurgencies against Governor Jin Shuren in the early 1930s, a rebellion in Kashgar led to the establishment of the short-lived First East Turkistan Republic (First ETR) in 1933. The ETR claimed authority around the Tarim Basin from Aksu in the north to Khotan in the south, and was suppressed by the armies of the Chinese Muslim warlord Ma Zhongying in 1934.

#### Second East Turkistan Republic

Sheng Shicai invited a group of Chinese Communists to Xinjiang including Mao Zedong's brother Mao Zemin, but in 1943, fearing a conspiracy against him, Sheng killed all the Chinese Communists, including Mao Zemin. In the summer of 1944, during the Ili Rebellion, a Second East Turkistan Republic (Second ETR) was established, this time with Soviet support, in what is now Ili Kazakh Autonomous Prefecture in northern Xinjiang. The Soviets allowed Sheng to remain in power in order to establish a buffer state against the Japanese sphere of influence, while Sheng accepted Soviet assistance out of the fear that otherwise Xinjiang would be invaded and partitioned in a similar way to the invasion of Poland under the Molotov–Ribbentrop Pact.
The Three Districts Revolution, as it is known in China, threatened the Nationalist provincial government in Ürümqi. Sheng Shicai fell from power and Zhang Zhizhong was sent from Nanjing to negotiate a truce with the Second ETR and the USSR. Chiang Kai-shek negotiated for the Red Army's withdrawal from the region under the Sino-Soviet Treaty of Friendship and Alliance. An uneasy coalition provincial government between the ETR and the Kuomintang was formed and brought nominal unity to Xinjiang with separate administrations.
The coalition government came to an end at the conclusion of the Chinese Civil War when the victorious Chinese Communists entered Xinjiang in 1949. The leadership of the Second ETR was persuaded by the Soviet Union to negotiate with the Chinese People's Political Consultative Conference. Most were killed in an airplane crash en route from the Kazakh Soviet Socialist Republic to a peace conference in Beijing in late August; the crash was widely suspected to be an assassination ordered by Joseph Stalin. The remaining leadership under Saifuddin Azizi agreed to join the newly founded People's Republic of China. The Republic of China Armed Forces commanders in Xinjiang, Tao Zhiyue and provincial governor Burhan Shahidis surrendered to the People's Liberation Army (PLA) in September. Kazak militias under Osman Batur resisted the PLA into the early 1950s. The Xinjiang Uyghur Autonomous Region of the PRC was established on 1 October 1955, replacing Xinjiang Province.

### Intermarriages between Han and Uyghurs

In Urumqi (Uyghur) Muslim women who married Han Chinese men were assaulted, seized, and kidnapped by hordes of (Uyghur) Muslims on 11 July 1947. Old (Uyghur) Muslim men forcibly married the women. In response to the chaos a curfew was placed at 11 p.m.
The marriages between Muslim (Uyghur) women and Han Chinese men infuriated the Uyghur leader Isa Yusuf Alptekin.
Mixed Han-Uyghur partners were pressured to leave their parents and sometimes Xinjiang entirely. During the Republic era from 1911 to 1949, Han military generals were pursued and wooed by Uyghur women. In 1949 when the Communists took over, the Uyghur population branded such women as milliy munapiq (ethnic scum), threatening and coercing them in accompanying their Han partners in moving to Taiwan and "China proper." Uyghur parents warned such women not to return any of their children, male or female, to Xinjiang after moving to "China proper" for attending educational institutions. This was so they could avoid ostracism and condemnation from their fellow Uyghurs. A case where a Han male dating a Uyghur woman and then a Han man and her elder sister incited the Uyghur community to condemn and harass her mother.

## People's Republic of China (1949–present)
### Takeover by the People's Liberation Army

During the Ili Rebellion the Soviet Union backed Uyghur separatists to form the Second East Turkistan Republic (2nd ETR) from 1944 to 1949 in what is now Ili Kazakh Autonomous Prefecture (Ili, Tarbagatay and Altay Districts) in northern Xinjiang while the majority of Xinjiang was under Republic of China Kuomintang control.
Xinjiang was one of the last regions of Mainland China to be conquered by the Chinese Communist Party during the Chinese Civil War, and it enjoyed stability and prosperity relative to the rest of the country during the conflict. People's Liberation Army forces under Peng Dehuai began advancing towards the region after capturing key east–west railways in the Huaihai campaign. Dehuai defeated the Muslim Chinese general Ma Bufang's Kuomintang cavalry in the Lanzhou Campaign and invaded the province. The remaining Republic of China Armed Forces under Tao Zhiyue surrendered in October 1949 after the PLA encircled Ürümqi. Shortly afterwards the Soviet Armed Forces returned to help impose communist rule. The USSR continued to have great influence in the region until the Sino-Soviet split, as the Sino-Soviet Treaty of Friendship, Alliance and Mutual Assistance allowed the Red Army free passage and guaranteed the USSR exclusive economic rights. The PLA First Field Army also remained to defend borders.
According to the People's Republic of China, the 2nd ETR was Xinjiang's revolution, a positive part of the communist revolution in China; the 2nd ETR acceded to and 'welcomed' the PLA when it entered Xinjiang, a process known as the Incorporation of Xinjiang into the People's Republic of China.
Uyghur nationalists often incorrectly claim that 5% of Xinjiang's population in 1949 was Han, and that the other 95% was Uyghur, erasing the presence of Kazakhs, Xibes, etc., and ignoring the fact that Hans were around one-third of Xinjiang's population at 1800, during the Qing dynasty.
Although Mao Zedong had attempted to recruit Uyghurs to the CCP, there remained too few in the area to govern. As a result, Premier Zhou Enlai decided to have mostly Han Chinese cadres responsible for governing Uyghur communities and implementing land reform. The CCP officials initially respected local customs and traditions, provided local public works projects, and tried to present themselves as less exploitative than previous Han-minority administrations. At the same time, the CCP began securing control over the Islamic clergy through the Chinese Islamic Association and the Islamic Theological Institute, and the military continued suppressing uprisings against communist rule.
The autonomous region was established on 1 October 1955. In 1955 (the first modern census in China was taken in 1953), Uyghurs were counted as 73% of Xinjiang's total population of 5.11 million. Although Xinjiang as a whole is designated as a "Uyghur Autonomous Region", since 1954 more than 50% of Xinjiang's land area are designated autonomous areas for 13 native non-Uyghur groups. However, the borders were drawn so that no ethnic minority could exercise autonomy where they composed a majority. For instance, the Ili Kazakh Autonomous Prefecture was established in a Uyghur-majority region, while other Uyghur-majority municipalities and prefectures were simply denied autonomy.
The PRC's first nuclear test was carried out at Lop Nur, Xinjiang, on 16 October 1964. Japanese physicist Jun Takada, known for prominently opposing the tests as "the Devil's conduct" speculated that between 100,000 and 200,000 people may have been killed due to the consequential radioactive fallout. According to the Scientific American article, Jun Takada was not allowed into China. Moreover, he 'studied radiation effects from tests conducted by the U.S., the former Soviet Union and France'. However the Lop Nur area has not been permanently inhabited since the 1920s. This is because it is located between the Taklamakan and Kumtag deserts in Ruoqiang County, which has an area of almost 200,000 km$^2$ (77,000 sq mi) with a population density of only 0.16/km$^2$. Furthermore, Chinese media rejected Takada's conclusion. Nonetheless, in 1985 Uyghurs in Ürümqi, Beijing, and Shanghai took advantage of a political thaw under Deng Xiaoping's Four Modernizations to stage mass anti-nuclear protests against continued Chinese nuclear tests in Lop Nur.

### Han migration into the region

The PRC has stimulated Han migration into the sparsely populated Dzungaria (Dzungar Basin). Before 1953 most of Xinjiang's population (75%) lived in the Tarim Basin, so the new Han migrants changed the distribution of population between Dzungaria and the Tarim. Beginning with the proclamation of the People's Republic of China in 1949, the CCP began deporting tens of thousands of Han Chinese petty thieves, beggars, vagrants, prostitutes, and soldiers who had fought with the Kuomintang to Xinjiang. Although the Chinese government also tried to encourage voluntary migration to the region with promises of improved living standards, most of the initial migrants were political prisoners who were forced to relocate and conduct laogai projects. Most new Chinese migrants ended up in the northern region Dzungaria. Han and Hui made up the majority of the population in Dzungaria's cities while Uighurs made up most of the population in the Tarim's Kashgarian cities. Eastern and Central Dzungaria are the specific areas where these Han and Hui are concentrated.

### Xinjiang conflict

The Xinjiang conflict is a conflict in China's far-west province of Xinjiang which is centred around the Uyghurs, a Turkic minority ethnic group which makes up the largest ethnic group in the region.
Factors such as the massive state-sponsored migration of Han Chinese from the 1950s to the 1970s, government policies promoting Chinese cultural unity and punishing certain expressions of Uyghur identity, and heavy-handed responses to separatist terrorism have contributed to tension between Uyghurs, and state police and Han Chinese. This has taken the form of both frequent terrorist attacks and wider public unrest (such as the July 2009 Ürümqi riots).
In recent years, government policy has been marked by mass surveillance, increased arrests, and a system of internment camps, estimated to hold hundreds of thousands of Uyghurs and members of other Muslim minority groups.

#### Uyghur nationalism

Uyghur nationalist historians such as Turghun Almas claim that Uyghurs were distinct and independent from Chinese for 6000 years, and that all non-Uyghur peoples are non-indigenous immigrants to Xinjiang. This constructed history was so successful, that China ceased publishing Uyghur historiography in 1991. Chinese historians state that the region was 'multicultural' since ancient times, refuting Uyghur nationalist claims by pointing out the 2,000-year history of Han settlement in Xinjiang, documenting the history of Mongol, Kazakh, Uzbek, Manchu, Hui, Xibo indigenes in Xinjiang, and by emphasizing the relatively late "westward migration" of the Huigu (equated with "Uyghur" by the PRC government) people from Mongolia the 9th century.
Yet, Bovingdon notes that both Uygur and Chinese narratives do not accord with the historical facts and developments, which are complex and interwoven, noting that the Han dynasty (206 BC – 220 AD) established military colonies (tuntian) and commanderies to control Xinjiang from 120 BC, while the Tang dynasty (618–907) also controlled much of Xinjiang until the An Lushan rebellion. In the 9th century, after the fall of the Uyghur Khanate, the Uyghurs migrated to Xinjiang from the area encompassed by Mongolia, Inner Mongolia, and Siberia, having originated from the 'Mongolian core lands of the Orkhon river valley'. The name "Uyghur" originally was associated with a Buddhist people in the Tarim Basin in the 9th century, but completely disappeared by the 15th century, until it was revived by the Soviet Union in the 20th century.
Bovingdon notes that China faces similar problems in constructing a narrative that has to fill gaps in the desired historical record.

##### Sino-Soviet conflicts in Xinjiang

The Soviet Union supported Uyghur nationalist propaganda and East Turkestan independence movements against China. The Soviets incited separatist activities in Xinjiang through propaganda, encouraging Kazakhs to flee to the Soviet Union and attack China. China responded by reinforcing the Xinjiang-Soviet border area specifically with Han Bingtuan militia and farmers. Since 1967 the Soviets intensified their broadcasts inciting Uyghurs to revolt against the Chinese via Radio Tashkent and directly harbored and supported separatist guerilla fighters to attack the Chinese border. In 1966 the number of Soviet sponsored separatist attacks on China numbered 5,000.
After the Sino-Soviet split in 1962, over 60,000 Uyghurs and Kazakhs defected from Xinjiang to the Kazakh Soviet Socialist Republic, in response to Soviet propaganda which promised Xinjiang independence. Uyghur exiles later threatened China with rumors of a Uyghur "liberation army" in the thousands that were supposedly recruited from Sovietized emigres.
In 1968 the Soviet Union was involved in funding and supporting the East Turkestan People's Revolutionary Party (ETPRP), the largest militant Uyghur separatist organization in its time, to start a violent uprising against China. In the 1970s, the Soviets also supported the United Revolutionary Front of East Turkestan (URFET) to fight against the Chinese.
In 1966-67 "bloody incidents" flared up as Chinese and Soviet forces clashed along the border. The Soviets trained anti-Chinese guerillas and urged Uyghurs to revolt against China, hailing their "national liberation struggle". In 1969, Chinese and Soviet forces directly fought each other along the Xinjiang-Soviet border.
A chain of aggressive and belligerent press releases in the 1990s making false claims about violent insurrections in Xinjiang, and exaggerating both the number of Chinese migrants and the total number of Uyghurs in Xinjiang were made by the former Soviet supported URFET leader Yusupbek Mukhlisi.
Xinjiang's importance to China increased after the Soviet invasion of Afghanistan in 1979, leading to China's perception of being encircled by the Soviets. The Chinese supported the Afghan mujahideen during the Soviet–Afghan War, and broadcast reports of Soviet atrocities on Afghan Muslims to Uyghurs in order to counter Soviet propaganda broadcasts into Xinjiang, which boasted that Soviet minorities lived better and incited Muslims to revolt. Chinese radio beamed anti-Soviet broadcasts to Central Asian ethnic minorities like the Kazakhs.
The Soviets feared disloyalty among the non-Russian Kazakh, Uzbek, and Kyrgyz in the event of Chinese troops attacking the Soviet Union and entering Central Asia. Russians were goaded with the taunt "Just wait till the Chinese get here, they'll show you what's what!" by Central Asians when they had altercations.
The Chinese authorities viewed the Han migrants in Xinjiang as vital to defending the area against the Soviet Union. China opened up camps to train the Afghan Mujahideen near Kashgar and Khotan and supplied them with hundreds of millions of dollars worth of small arms, rockets, mines, and anti-tank weapons.

#### Incidents

Since the late 1970s Chinese economic reform exacerbated uneven regional development, more Uyghurs have migrated to Xinjiang cities and some Hans have also migrated to Xinjiang for independent economic advancement. Increased ethnic contact and labor competition coincided with Uyghur separatist terrorism from the 1990s, such as the 1997 Ürümqi bus bombings.
After a number of student demonstrations in the 1980s, the Baren Township riot of April 1990 led to more than 20 deaths.
1997 saw the Ghulja Incident and Urumqi bus bombs, while police continue to battle with religious separatists from the East Turkestan Islamic Movement.
Recent incidents include the 2007 Xinjiang raid, a thwarted 2008 suicide bombing attempt on a China Southern Airlines flight, and the 2008 Xinjiang attack which resulted in the deaths of sixteen police officers four days before the Beijing Olympics. Further incidents include the July 2009 Ürümqi riots, the September 2009 Xinjiang unrest, and the 2010 Aksu bombing that led to the trials of 376 people. In 2013 and 2014 a series of attacks on railway stations and a market, which claimed the lives of 70 people, and wounded hundreds more, resulted in a 12-month government clampdown. Two mass sentencing trials involving 94 people convicted of terrorism charges, resulted in three receiving death sentences, and the others lengthy jail terms.

#### Persecution of Uyghurs in Xinjiang

Since 2014, the Chinese government under the Xi Jinping Administration has pursued a policy which has led to more than one million Muslims (the majority of them Uyghurs) being held in secretive detention camps without any legal process in what has become the largest-scale detention of ethnic and religious minorities since the Holocaust. Critics of the policy have described it as the sinicization of Xinjiang and have called it an ethnocide or cultural genocide, while many activists, independent NGOs, human rights experts, government officials and the East Turkistan Government-in-Exile have called it a genocide.
Throughout this time, the Xinjiang internment camps, operated by the Xinjiang Uygur Autonomous Region government and its Chinese Communist Party provincial committee, have been used as places to indoctrinate Uyghurs and other Muslims as part of a "people's war on terror," a policy announced in 2014. The camps have been criticized by many countries and human rights organizations for alleged human rights abuses and mistreatment, with some even alleging genocide, though others have expressed support for the camps.
In May 2018, US Assistant Secretary of Defense for Indo-Pacific Security Affairs Randall Schriver said "at least a million but likely closer to three million citizens" were imprisoned in detention centers, which he described as "concentration camps". In August 2018, Gay McDougall, a US representative at the United Nations Committee on the Elimination of Racial Discrimination, said that the committee had received many credible reports that 1 million ethnic Uyghurs in China have been held in internment camps.
Writing in the Journal of Political Risk in July 2019, independent researcher Adrian Zenz estimated an upper speculative limit to the number of people detained in Xinjiang internment camps at 1.5 million. In November 2019, Adrian Zenz estimated that the number of internment camps in Xinjiang had surpassed 1,000. In November 2019, George Friedman estimated that 1 in 10 Uyghurs are being detained in internment camps.
Public reporting has highlighted the continued concentration of Uyghurs in the camps, including suppression of Uyghur religious practices, political indoctrination, severe ill-treatment, and testimonials of alleged human rights abuses including forced sterilization, forced abortion, and the forced use of contraceptive drugs and implants.
In August 2022, the UN Human Rights Office assessment of human rights concerns in Xinjiang concluded that the extent of arbitrary and discriminatory detention of members of Uyghur and other predominantly Muslim groups in China, since 2017, pursuant to law and policy, in context of restrictions and deprivation more generally of fundamental rights enjoyed individually and collectively, may constitute international crimes, in particular crimes against humanity.

### Education

From 1949 to 2001, education has expanded greatly in the region, with 6,221 primary schools up from 1,335; 1,929 middle schools up from 9, and institutions of higher learning at 21, up from 1. The illiteracy rate for young and middle-age people has decreased to less than 2%. Agricultural science has made inroads into the region, as well as innovative methods of road construction in the desert.
Culturally, Xinjiang maintains 81 public libraries and 23 museums, compared to none of each in 1949, and Xinjiang has 98 newspapers in 44 languages, up from 4 newspapers in 1952. According to official statistics, the ratios of doctors, medical workers, medical clinics, and hospital beds to people surpass the national average, and immunization rates have reached 85%.