Turkic settlement of the Tarim Basin
The Turkic peoples were descended from a Transeurasian agricultural community based in northeast China, and they were not recognized as native to the Xinjiang until the area was settled in by Tang-allied Türk (Tujue) tribes in the 7th century, and later by Turkic Uyghur people who founded the Qocho Kingdom there in the 9th century. The historical area of what is modern-day Xinjiang consisted of the distinct areas of the Tarim Basin (also known as Altishahr) and Dzungaria and was populated by Indo-European Tocharians and Saka peoples, who practiced Buddhism. They  came under Chinese rule in the Han dynasty as the Protectorate of the Western Regions due to wars between the Han dynasty and the Xiongnu and again in the Tang dynasty as the Protectorate General to Pacify the West due to wars between the Tang dynasty and the First, Western, and Eastern Turkic Khaganates. The Tang dynasty withdrew its control of the region in the Protectorate General to Pacify the West and the Four Garrisons of Anxi after the An Lushan Rebellion, after which the Turkic peoples and the other native inhabitants living in the area forcedly or involuntarily converted  to Islam. Tarim Basin. The Tarim Basin, populated by the Indo-European Tocharian and Saka, became the place of settlement by two different Turkic Kingdoms, the Buddhist Turkic Uyghur Kingdom of Qocho and the Muslim Turkic Karluk Kara-Khanid Khanate. The Turfan and Tarim Basins were populated by speakers of Tocharian languages, with "Europoid" mummies found in the region. The oases were populated by Iranian and Tocharian language speakers. Different historians suggest that either the Sakas or Tokharians made up the Yuezhi people who lived in Xinjiang. The northern Tarim Basin is where Tokharian language records were found. The inhabitants  of the Tarim Basin consisted of Buddhist Indo-Europeans, divided between Tocharians and Eastern Iranian Sakas. The discovery of the Tarim mummies has created a stir in the Turkic-speaking Uighur population of the region, who claim the area has always belonged to their culture, while it was not until the 10th century when the Uighurs are said by scholars to have moved to the region from Central Asia. American Sinologist Victor H. Mair claims that "the earliest mummies in the Tarim Basin were exclusively Caucasoid, or Europoid" with "east Asian migrants arriving in the eastern portions of the Tarim  Basin around 3,000 years ago", while Mair also notes that it was not until 842 that the Uighur peoples settled in the area. Han and Tang rule. During the Han dynasty, the Tocharians and Sakas of Xinjiang came under a Chinese protectorate in 60 BC, with the Chinese protecting the Tocharian and Saka city states from the nomadic Xiongnu who were based in Mongolia, and during the Tang dynasty they once again became a protectorate of China with China protecting the Tocharian and Saka city states against the First Turkic Khaganate and the Turkic Uyghur Khaganate. Arab sources claim that  first recorded incursion into the Tarim Basin by an Islamic force is the alleged attack on Kashghar by Qutayba ibn Muslim in 715 but some modern historians entirely dismiss this claim. The Tang dynasty Chinese defeated the Arab Umayyad invaders at the Battle of Aksu (717). The Arab Umayyad commander Al-Yashkuri and his army fled to Tashkent after they were defeated. Uyghur migration into the Tarim Basin. Tang China lost control of Xinjiang after it was forced to withdraw its garrisons during the An Lushan Rebellion. During the rebellion China received aid from the Uyghur Khaganate in crushing An  Lushan's rebels, however, multiple provocations by the Uyghurs such as selling bad quality horses to China, practicing usury when lending to Chinese, and sheltering Uyghurs who committed murder resulted in a major deterioration in relations between China and the Uyghur Khaganate. Tang China then allied with the Yenisei Kirghiz and defeated and destroyed the Uyghur Khaganate in a war, triggering the collapse of the Uyghur Khaganate which caused Uyghurs to migrate from their original lands in Mongolia southwestwards into Xinjiang. Protected by the Taklamakan Desert from steppe nomads, elements of Tocharian culture survived until the 7th century, when the  arrival of Turkic immigrants from the collapsing Uyghur Khaganate of modern-day Mongolia began to absorb the Tocharians to form the modern-day Uyghur ethnic group. Kara-Khanid conquest of Khotan. The Iranic Saka peoples originally inhabited Yarkand and Kashgar in ancient times, and were ruled by the Buddhist Saka Kingdom of Khotan and Shule Kingdom when the first major Turkic incursions into the area began. The Saka Kings were still culturally-influenced by the Buddhist homeland of Northern India, with their rulers adopting Sanskrit names and titles. The Buddhist entities of Khotan and Dunhuang (in present-day Gansu) had  a tight-knit partnership, with intermarriage between Dunhuang and Khotan's rulers and Dunhuang's Mogao grottos and Buddhist temples being funded and sponsored by the Khotan royals, whose likenesses were drawn in the Mogao grottoes. The rulers of Khotan were aware of the menace they faced since they arranged for the Mogao grottoes to paint a growing number of divine figures along with themselves. By the time the Turkic Uyghur (Buddhist) and the Turkic Kara-Khanid (Muslim) invaded, Khotan was the only state in the area that had not come under Turkic rule. It was during the Karakhanid reign  that Buddhism lost territory to Islam in the Kashgar area. A long war ensued between Islamic Kashgar and Buddhist Khotan which eventually ended in the conquest of Khotan by Kashgar. Many tales emerged about the Kara-Khanid ruling family's war against the Buddhists, and it is said that either Satok Bughra Khan's nephew or his grandson Ali Arslan was slain by the Buddhists during the war. A shrine dedicated to Ali Arslan or Sultan Arslan Boghra who was killed in the campaign against Khoton was the most popular shrine of the region. His body was buried on the  field of battle at Ordam Padshah, to the east of Yangi Hissar, but his head is preserved at a shrine in the Dolat Bagh, near Kashgar. Satok Boghra Khan's last campaign was undertaken against Turfan, where in 993 he fell ill and whence he was carried back, a dying man, to Kashgar. His son and successor, Hasan, is known to history as having ended the Samanid dynasty by the capture of Abdul Malik. A few years later both Hasan and his brother were killed by the Princes of Khotan. In what proved to be a pivotal moment in the  Islamicization of the Tarim Basin, the Karakhanid leader Yusuf Qadir Khan conquered Khotan around 1006. After the occupation by the Karakhanids, Turki became the universal language and the Saka language was banned while the records of it were to be destroyed. The oldest Kashgar book which has reached us, and which dates from 1068, is written in a pure Turki dialect. Taẕkirah Literature and the Legacy of the Khotan Conquest in Uyghur Sufism. The Taẕkirah is a genre of literature written about Sufi Muslim saints in Altishahr. Written sometime in the period from 1700 to 1849, the Eastern Turkic language  (modern Uyghur) " Taẕkirah of the Four Sacrificed Imams" provides an account of the Muslim Kara-Khanid war against the Khotanese Buddhists. The "Taẕkirah" uses the story of the Four Imams as a device to frame the chronicle, the Four Imams being a group of Islamic scholars from Mada'in city (possibly in modern-day Iraq), who travelled to help the Islamic conquest of Khotan, Yarkand, and Kashgar by the Kara-Khanid leader Yusuf Qadir Khan. The legend of the conquest of Khotan is also given in the hagiology known as the Tazkirat or "Chronicles of Boghra". Extracts from the Tazkiratu'l-Bughra  on the Muslim war against the Khotan was translated by Robert Barkley Shaw. The shrines of Sufi Saints are revered in Altishahr as one of Islam's essential components and the tazkirah literature reinforced the sacredness of the shrines. It is even written in the "Tazkirah of the Four Sacrificed Imams" that "...those who doubt Their Holinesses the Imams will leave this world without faith, and on Judgement Day their faces will be black""" . The fervor of the Qarakhand elite meant that in many cases, the ancient Chinese, Tocharian, Sogdian, Sanskrit, and Khotanese language texts dealing with Christianity, Manichaeanism, and  Buddhism which contain important historical information were more or less ignored as sources of information for the region. After the Buddhist Khotanese killed Imam Shakir Padshah, a "Pigeons' Sanctuary" shrine arose in Khotan where pigeons "believed to be the offspring of a pair of doves which miraculously appeared from the heart of Imam Shakir Padshah" are taken care of and fed by pilgrims, this shrine was visited by Sir Aurel Stein. The conflict in which Xinijiang's Buddhist kingdoms were conquered are regarded as holy Jihad and the shehit (martyrs of Islam) who died in action in the wars are  revered and worshiped at tombs called mazar by pilgrims in the present day. The Khotanese Buddhists killing of the martyr Imam Asim led to his grave being worshiped in a massive annual ceremony called the "Imam Asim Khan festival". The writing and language of the Khotanese Indo European Eastern Iranics became extinct after the 11th century. Khotan was defeated and annexed by the war started by Kadir Khan Yusuf of the Karakhanids. Michael Dillon wrote that the 1000s-1100s Islam-Buddhist war are still recalled in the forms of the Khotan Imam Asim Sufi shrine celebration and other Sufi holy site  celebrations. Bezeklik's "Thousand Buddha Caves" are an example of the religiously motivated vandalism against portraits of religious and human figures. Anti portrait Muslims had Buddhist portraits obliterated during the wars over hundreds of years in which Buddhism was replaced by Islam. Cherrypicking of history of Xinjiang with the intention of projecting an image of irreligiousity or piousness of Islam in Uyghur culture has been done by people with agendas. Muslim works such as Ḥudūd al-ʿĀlam contained anti-Buddhist rhetoric and polemic against Buddhist Khotan, aimed at "dehumanizing" the Khotanese Buddhists, and the Muslims Kara-Khanids conquered Khotan just 26  years following the completion of Ḥudūd al-ʿĀlam. Muslims gouged the eyes of Buddhist murals along Silk Road caves and Kashgari recorded in his Turkic dictionary an anti-Buddhist poem/folk song. Sultan Satuq Bughra Khan and his son directed endeavors to proselytize Islam among the Turks and engage in military conquests. Buddhist temples and other non-Muslim buildings were razed by the Karakhanids once they converted to Islam in Kashgar. In 970 the Karakanids at first lost Kashgar to the Khotanese after a Khotanese military victory under Khotanese King Visa Sura who sent a "dancing elephant" to China along with  a tool made of steel and a silver case with a cup, from the war booty seized in battle from the Karakhanids in addition to vessels, tools, leather armor, and jade as tribute, along with a letter in a royal edict to give the reason why the tribute was sent behind schedule and not on time to China, since the Khotanese just barely beat the Karakhanids out of Kashgar to its city limits and were holding it with great difficulty. From 970 the Karakhanids continued to fight the Khotanese until sometime before 1006 in the eventual conquest of Khotan by  the Yusuf Qadir Khan, the Karakhanid leader. The Muslim attacks likely were the cause of requests for aid when China saw the arrival of multiple Khotanese diplomatic delegations. Defense assistance was requested of the Cao Guiyi rulers of Dunhuang after the Muslims were defeated by Visa Sura, Khotanese King in 970. After the victory over Kashghar Muslims at the hands of the Khotanese an elephant was sent as tribute by Khotan in 971 to Song dynasty China. After the Qara Khanid Turkic Muslims defeated the Khotanese under Yusuf Qadir Khan at or before 1006, China received a tribute mission in  1009 from the Muslims. The Encyclopaedia Sinica, by Samuel Couling says : ""After Chang Ch'ien's mission, Khotan sent an embassy to China... Till the end of the eighth century Chinese political influence remained potent, but then Tibet ended it, and Chinese annals are silent about Khotan for a century and a half. Then embassies were sent, probably seeking help against the Mohammedans, who, however, conquered the district at the end of the tenth century."" The Buddhist Yutian (Khotan) experienced waves of jihads unleashed upon them by the Karakhanid leader Musa, the son of Satuk Bughra Khan although the jihads were  unsuccessful, and the Khotanese managed to seize Kashgar after forcibly converted to Islam Buddhists revolted against the Karakhands in 969 the capital of the Karakhanids was temporarily seized by the Khotanese. In Yengisar in 998 the Yutian (Khotanese) managed to seize Kashgar and kill the Karakhanid leader Hasan in battle, striking the Karakhanids while the Karakhanids were busy fighting the Samanids. Buddhist Khotan was finally conquered when 140,000 mujahideen under Karakhanid leader Yusuf Kadir Khan attacked them. After 1006 when the Muslims won against the Khotanese they shut down Cave 17 in Dunhuang. The Islamic conquest of Khotan led to  alarm in the east and Dunhuang's Cave 17, which contained Khotanese literary works, was closed shut possibly after its caretakers heard that Khotan's Buddhist buildings were razed by the Muslims, the Buddhist religion had suddenly ceased to exist in Khotan. The Guiyi circuit shut down the Khotanese libraries at Dunhuang after Khotan came under assault by Karakhanid Muslims. Cao Yuanzhong received a message from the King of Khotan in 970 that Khotan was under assault by Kashgari Muslim Karakhanids. The shutting down may have occurred after the Buddhists came under assault by the Muslims at Khotan. Buddhism was  destroyed totally in the sanguine, decades long war in Khotan by the Karakhanids. Henri Cordier wrote in "The book of Ser Marco Polo, the Venetian, concerning the Kingdoms and Marvels of the East" : ""The Buddhist Government of Khotan was destroyed by Boghra Khán (about 980—990); it was temporarily restored by the Buddhist Kutchluk Khán, chief of the Na'i'mans, who came from the banks of the Ili, destroyed the Mahomedan dynasty of Boghra Khán (1209). but was in his turn subjugated by Chinghiz Khan. The only Christian monument discovered in Khotan is a bronze cross brought back by Grenard (iii. pp . 134—135); see also Gabriel Devéria, 'Notes d'Épigraphie Mongole,' p. 80.—H. C. "" A Buddhist revival occurred in the Tangut Western Xia state since Muslims placed strain on the oasis states in Central Asia since before that most support for Buddhism came from Khotan. The Kara khanids were vanquishing the Khotan Buddhist state so the Western Xia Tangut state instead became the safe haven when Muslims attacked Indian Buddhist monks and drove them out of their lands. In 1006, the Muslim Kara-Khanid ruler Yusuf Kadir (Qadir) Khan of Kashgar conquered Khotan, ending Khotan's existence as an independent state. The Karakhanid  Turkic writer Mahmud al-Kashgari recorded a short Turkic language poem about the conquest: Robert Dankoff has judged the poem to refer to Khotan's conquest by the Qarakhanids even though the text in Kashgari's work says it was against Uyghurs. Idols of "infidels" were subjected to desecration by being defecated upon by Muslims when the "infidel" country was conquered by the Muslims, according to Muslim tradition. It was written by Kashgari that - "it is customary for the Muslims, when they captured a country of infidels, to defecate on the heads of their idols in order to profane them .". Besides the jihad against Yutian (Kingdom of Khotan), the Uygur Karakhoja Kingdom (Kingdom of Qocho) was also subjected to Jihad in which Buddhist temples were razed and Islam spread by the Karakhanid ruler Sultan Satuq Bughra Khan. The '"Compendium of the Turkic Dialects" by Kashgari, included among the infidels, the Uighurs. It was written ""just as the thorn should be cut at its root, so the Uighur should be struck on the eye"" by Kashgari, who viewed them as untrustworthy and noted that Muslim Turks used the derogatory name "Tat" against the Buddhist Uighurs whom Kashgari described as "infidels". The  identities of "Buddhist" and "Uyghur" were intertwined with each other. The Buddhist Uighurs were subjected to an attack by the Muslim Turks and this was described in Mahmud Kashgari's work. Mahmud Kaşgari's works contained poetry stanzas and verses which described fighting between Buddhist Uighurs (Buddhist Turks) and Muslim Karakahnids (Muslim Turks). Uighur Buddhist temples were desecrated and Uighur cities were raided and Minglaq province across the river Ili was the target of the conquest against the Buddhist Uighur by the Muslim Karakhanids as described in 5-6 stanzas of Kashgari's work. Mahmud Kashgari insulted the Uyghur Buddhists  as "Uighur dogs" and called them "Tats", according to the Tuxsi and Taghma, although other Turks called Persians "Tats". While Kashgari displayed a different attitude towards the Turks diviners beliefs and "national customs", he expressed towards Buddhism a hatred in his Diwan where he wrote the verse cycle on the war against Uighur Buddhists. Buddhist origin words like toyin (a cleric or priest) and Burxān or Furxan (meaning Buddha, acquiring the generic meaning of "idol" in the Turkic language of Kashgari) had negative connotations to Muslim Turks. Kashgari claimed that the Prophet assisted in a miraculous event where 700,000 Yabāqu  were defeated by 40,000 Muslims led by Arslān Tegīn claiming that fires shot sparks from gates located on a green mountain towards the Yabāqu. The Yabaqu were a Turkic people. The non-Muslim Turks worship of Tengri was mocked and insulted by the Muslim Kashgari, who wrote about a verse referring to them - "The Infidels - May God destroy them!" The wars against the Buddhist, Shamanist, and Manichean Uighurs were considered a Jihad by the Kara-Khanids. The Uyghur state in eastern Xinjiang had tolerated Christianity and Buddhism but had opposed Islam. The Imams and soldiers who died in the battles  against the Uyghur Buddhists and Khotan Buddhist Kingdom during the Tarim Basin's Islamization at the hands of the Karakhanids are revered as saints. It was possible the Muslims drove some Uighur Buddhist monks towards taking asylum in the Western Xia dynasty. Khizr Khoja's attack on Turfan and Qocho. In the 1390s, the Chagatai ruler Khizr Khwaja launched a holy war against the Kingdom of Qocho and Turfan, which were viewed as part of "Khitay" which was a name for China. Although Khizr Khwaja claimed to have converted to these kingdoms to Islam, the conversion was more gradual. Travellers  passing through the area in 1420 remarked on the rich Buddhist temples, and only after 1450 were substantial numbers of mosques reported. As a consequence of the imposition of Islam, the city of Jiaohe was abandoned in the 15th century. Kara Del was a Mongolian ruled and Uighur populated Buddhist Kingdom. The Muslim Chagatai Khan Mansur invaded and used force to make the population convert to Islam. It was reported that between Khitay and Khotan the Sarigh Uyghur tribes who were "impious" resided, and they were targeted for ghazat (holy war) by Mansur Khan following 1516. 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 Dzungars were the ones who built Buddhist monuments in their area. Buddhist influences still remain among the Turfan Muslims. Since Islam reached them much after Altishahr, personal names of un-Islamic Old Uyghur origin are still used in Qumul and Turfan while people in Altishahr use mostly Islamic names of Persian and Arabic origin. The mujahideen of the Islamic Chagatai Khanate conquered the Uyghur and Hami was purged of the Buddhist religion which was replaced with Islam . The Islamic conversion forced on the Buddhist Hami state was the final event in the Islamization. Buddhist murals at the Bezeklik Thousand Buddha Caves were damaged by local Muslim population whose religion proscribed figurative images of sentient beings, the eyes and mouths in particular were often gouged out. Pieces of murals were also off for use as fertilizer by the locals. According to Joseph Fletcher, "For centuries Altishar had been 'the abod of Islam'. Its inhabitants lived under the obligation of Jihad". The 15th century was when Islamization finished off the Turkic Buddhists in Turfan. Dzungaria. Xinjiang consists of two  main geographically, historically, and ethnically distinct regions with different historical names, Dzungaria north of the Tianshan Mountains and the Tarim Basin south of the Tianshan Mountains, before Qing China unified them into one political entity called Xinjiang province in 1884. At the time of the Qing conquest in 1759, Dzungaria was inhabited by the Dzungar people, a steppe dwelling, nomadic Mongol-related ethnic group who practiced Tibetan Buddhism. Meanwhile, the Tarim Basin was inhabited by sedentary, oasis dwelling, Turkic speaking Muslim farmers, now known as the Uyghur people. They were governed separately until 1884. The native Uyghur name for the  Tarim Basin is Altishahr. The Qing dynasty was well aware of the differences between the former Buddhist Mongol area to the north of the Tianshan and Turkic Muslim south of the Tianshan, and ruled them in separate administrative units at first. However, Qing people 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, but rather it was the Chinese who held that point of view. During the  Qing rule, no sense of "regional identity" was held by ordinary Xinjiang people; rather, Xinjiang's distinct identity was given to the region by the Qing, since it had distinct geography, history and culture, while at the same time it was created by the Chinese, multicultural, settled by Han and Hui, and separated from Central Asia for over a century and a half. In the Dzungar genocide the Manchus exterminated the native Buddhist Dzungar Oirat Mongolic speaking people from their homeland of Dzungaria in Northern Xinjiang and resettled the area with a variety of different ethnic groups. The Qing "final  solution" of genocide to solve the problem of the Dzungar Mongols, made the Qing sponsored settlement of millions of Han Chinese, Hui, Turkestani Oasis people (Uyghurs) and Manchu Bannermen in Dzungaria possible, since the land was now devoid of Dzungars. The Dzungarian basin, which used to be inhabited by (Dzungar) Mongols, is currently inhabited by Kazakhs. In northern Xinjiang, the Qing brought in Han, Hui, Uyghur, Xibe, and Kazakh colonists after they exterminated the Dzungar Oirat Mongols in the region, with one third of Xinjiang's total population consisting of Hui and Han in the northern are, while around two  thirds were Uyghurs in southern Xinjiang's Tarim Basin. In Dzungaria, the Qing established new cities like Ürümqi and Yining. The Qing were the ones who unified Xinjiang and changed its demographic situation. The depopulation of northern Xinjiang after the Buddhist Öölöd Mongols (Dzungars) were slaughtered, led to the Qing settling Manchu, Sibo (Xibe), Daurs, Solons, Han Chinese, Hui Muslims, and Turkic Muslim Taranchis in the north, with Han Chinese and Hui migrants making up the greatest number of settlers. Since it was the crushing of the Buddhist Öölöd (Dzungars) by the Qing which led to promotion of Islam and  the empowerment of the Muslim Begs in southern Xinjiang, and migration of Muslim Taranchis to northern Xinjiang, it was proposed by Henry Schwarz that "the Qing victory was, in a certain sense, a victory for Islam". Xinjiang as a unified, defined geographic identity was created and developed by the Qing. It was the Qing which led to Turkic Muslim power in the region increasing since the Mongol power was crushed by the Qing while Turkic Muslim culture and identity was tolerated or even promoted by the Qing. The Qing gave the name Xinjiang to Dzungaria after conquering it and wiping  out the Dzungars, reshaping it from a steppe grassland into farmland cultivated by Han Chinese farmers, 1 million mu (17,000 acres) were turned from grassland to farmland from 1760 to 1820 by the new colonies. 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. A census of Xinjiang under Qing rule in the early 19th century tabulated ethnic shares of the population as 30% Han and 60% Turkic, while it dramatically shifted to  6% Han and 75% Uyghur in the 1953 census, however a situation similar to the Qing era-demographics with a large number of Han has been restored as of 2000 with 40.57% Han and 45.21% Uyghur. Professor Stanley W. Toops noted that today's demographic situation is similar to that of the early Qing period in Xinjiang. In northern Xinjiang, the Qing brought in Han, Hui, Uyghur, Xibe, and Kazakh colonists after they exterminated the Zunghar Oirat Mongols in the region, with one third of Xinjiang's total population consisting of Hui and Han in the northern are, while around  two thirds were Uyghurs in southern Xinjiang's Tarim Basin. Before 1831, only a few hundred Chinese merchants lived in southern Xinjiang oases (Tarim Basin) and only a few Uyghurs lived in northern Xinjiang (Dzungaria). 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. For the 1st time the name "Xinjiang" replaced old historical names such as "Western Regions", "Chinese Turkestan", "Eastern Turkestan", "Uyghuristan", "Kashgaria", "Uyghuria", "Alter Sheher" and "Yetti Sheher". The two separate regions, Dzungaria, known as Zhǔn bù (準部, Dzungar region) or  Tiānshān běi lù (天山北路, Northern March), and the Tarim Basin, which had been known as Altishahr, Huíbù (Muslim region), Huíjiāng (Muslim-land) or "Tiānshān Nánlù (天山南路, southern March), were combined into a single province called Xinjiang by in 1884. Before this, there was never one administrative unit in which North Xinjiang (Zhunbu) and Southern Xinjiang (Huibu) were integrated together. A lot of the Han Chinese and Chinese Hui Muslim population who had previously settled northern Xinjiang (Dzungaria) after the Qing genocide of the Dzungars, had died in the Dungan revolt (1862–77). As a result, new Uyghur colonists from Southern Xinjiang  (the Tarim Basin) proceeded to settle in the newly empty lands and spread across all of Xinjiang. After Xinjiang was converted into a province by the Qing, the provincialisation 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, which was formerly nearly completely inhabited by Han Chinese, and other areas like Ürümqi, 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. The Qing policies after they created Xinjiang by uniting Dzungaria and Altishahr (Tarim Basin) led Uyghurs to believe that the all of Xinjiang province was their homeland, since the annihilation of the Dzungars by the Qing, populating the Ili valley with Uyghurs from the Tarim Basin, creating one political unit with a single name (Xinjiang) out of the previously separate Dzungaria and the Tarim Basin, the war from 1864 to 1878 which led to the killing of much of the original Han Chinese and Chinese  Hui Muslims in Xinjiang, led to areas in Xinjiang with previously had insignificant amounts of Uyghurs, like the southeast, east, and north, to then become settled by Uyghurs who spread through all of Xinjiang from their original home in the southwest area. There was a major and fast growth of the Uyghur population, while the original population of Han Chinese and Hui Muslims from before the war of 155,000 dropped, to the much lower population of 33,114 Tungans (Hui) and 66,000 Han.