information:filtering
Qing rule

In the 17th century, the Buddhist Dzungar Khanate grew in power in Dzungaria. The Dzungar conquest of Altishahr ended the last independent Chagatai Khanate, the Yarkent Khanate, after the Aqtaghlik Afaq Khoja sought aid from the 5th Dalai Lama and his Dzungar Buddhist followers to help him in his struggle against the Qarataghlik Khojas. The Aqtaghlik Khojas in the Tarim Basin then became vassals to the Dzungars.

The expansion of the Dzungars into Khalkha Mongol territory in Mongolia brought them into direct conflict with Qing China in the late 17th century, and in the process also brought Chinese presence back into the region a thousand years after Tang China lost control of the Western Regions.

The Dzungar–Qing War lasted a decade. During the Dzungar conflict, two Aqtaghlik brothers, the so-called "Younger Khoja" (Chinese: 霍集佔), also known as Khwāja-i Jahān, and his sibling, the Elder Khoja (Chinese: 波羅尼都), also known as Burhān al-Dīn, after being appointed as vassals in the Tarim Basin by the Dzungars, first joined the Qing and rebelled against Dzungar rule until the final Qing victory over the Dzungars, then they rebelled against the Qing in the Revolt of the Altishahr Khojas (1757–1759), an action which prompted the invasion and conquest of the Tarim Basin by the Qing in 1759. The Uyghurs of Turfan and Hami such as Emin Khoja were allies of the Qing in this conflict, and these Uyghurs also helped the Qing rule the Altishahr Uyghurs in the Tarim Basin.

The final campaign against the Dzungars in the 1750s ended with the Dzungar genocide. The Qing "final solution" of genocide to solve the problem of the Dzungar Mongols created a land devoid of Dzungars, which was followed by the Qing sponsored settlement of millions of other people in Dzungaria. In northern Xinjiang, the Qing brought in Han, Hui, Uyghur, Xibe, Daurs, Solons, Turkic Muslim Taranchis and Kazakh colonists, with one third of Xinjiang's total population consisting of Hui and Han in the northern area, 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 Dzungarian basin itself is now inhabited by many Kazakhs. The Qing therefore unified Xinjiang and changed its demographic composition as well. The crushing of the Buddhist Dzungars by the Qing led to the empowerment of the Muslim Begs in southern Xinjiang, migration of Muslim Taranchis to northern Xinjiang, and increasing Turkic Muslim power, with Turkic Muslim culture and identity was tolerated or even promoted by the Qing. It was therefore argued by Henry Schwarz that "the Qing victory was, in a certain sense, a victory for Islam".

In Beijing, a community of Uyghurs was clustered around the mosque near the Forbidden City, having moved to Beijing in the 18th century.

The Ush rebellion in 1765 by Uyghurs against the Manchus occurred after several incidents of misrule and abuse that had caused considerable anger and resentment. The Manchu Emperor ordered that the Uyghur rebel town be massacred, and the men were executed and the women and children enslaved.