Dzungar conquest of Altishahr

The Dzungar conquest of Altishahr resulted in the Tibetan Buddhist Dzungar Khanate in Dzungaria conquering and subjugating the Turkic Muslim Chingisid ruled Chagatai Khanate in Altishahr (the Tarim Basin). It put a final end to the independence of the Chagatai Khanate.

Conquest
The Turkic Muslim sedentary people of the Tarim Basin were originally ruled by the Chagatai Khanate while the nomadic Oirats in Dzungaria ruled over the Dzungar Khanate. The Naqshbandi Sufi Khojas, descendants of the Prophet 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 Zunghar 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-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.

Dzungar rule over Altishahr
The Dzungar Khan Galdan launched his invasion of the Tarim Basin in 1680. The Dzungars had received submissions from Hami and Turfan, who sent soldiers to join the 120,000 strong Dzungar force in the invasion. The Dzungar Oirat army and its allies in the White Mountain sect then easily conquered the Tarim, defeating and killing the Chagatai Prince Bābak Sultān, the son of the Chagatai leader Ismā'il Khan. Kashgar and Yarkand fell to the Dzungars and they killed the Chagatai General Yi-wa-zi-bo Beg. The Dzungars had deported to Ili the Chagatai royal family of Isma'il Khan after capturing them.

The Chagatai royal 'Abdu'l Rashīd Khan II was selected as puppet ruler by Galdan, however, Āfāq Khoja soon caused trouble and the strife between Āfāq and 'Abdu'l Rashid led to Āfāq's second exile, and 'Abd'ul Rashid was also forced into exile in Ili after in Yarkand an outbreak of violence happened in 1682, and he was replaced by Muhammad Amin who was his younger brother. Qing China received tribute from Muhammad Amin via Turfan two times, in 1690s the Mughals received an embassy from him, and in 1691 Muhammad Amin asked for deliverance from the "Qirghiz infidels" (Dzungars) when the Khan Subhān Quli of Bukhara received his embassy, these were attempts by Muhammad Amin to ask these foreign countries (Qing China, Mughal India, and Bukhara) for assistance against the Dzungars to regain independence.

The Āfāqi Khoja White Mountain supporters rebelled and murdered Muhammad Amin in 1694 and seized power under Yahyā Khoja, son of Āfāq Khoja, but Āfāqi rule continued for only two years before revolts resulted in the murder of both son and father Khojas. Muhammad Mu'min, another younger brother of 'Abdu'l Rashid was made Khan in 1696 however the Kashghar begs and the Kyrgyz staged a revolt and seized Muhammad Mu'min during an assault on Yarkand, then the Dzungars were asked to intervene by the Yarkand begs, which resulted in the Dzungars defeating the Kyrgyz and putting a total termination to Chagatai rule by installing Mirzā 'Ālim Shāh Beg as ruler in Yarkand.

Since 1680 the Dzungars had ruled as suzerain masters over the Tarim, for 16 more years using the Chagatai as their puppet rulers. The Dzungars used a hostage arrangement to rule over the Tarim Basin, keeping as hostsges in Ili either the sons of the leaders like the Khojas and Khans or the leaders themselves. Although the Uighur's culture and religion was left alone, the Dzungars substantially exploited them economically. The Uighurs were forced with multiple taxes by the Dzungars which were burdensome and set by a determined amount, and which they did not even have the ability to pay. They included water conservancy tax, draught animal tax, fruit tax, poll tax, land tax, tress and grass tax, gold and silver tax, and trade tax. Annually the Dzungars extracted a tax of 67,000 tangas of silver from the Kashgar people in Galdan Cering's reign, a five percent tax was imposed on foreign traders and a ten percent tax imposed on Muslim merchants, people had to pay a fruit tax if they owned orchards and merchants had to pay a copper and silver tax. Anually the Dzungars extracted 100,000 silver tangas in tax from Yarkand and slapped livestock, stain, commerce, and a gold tax on them. The Dzungars extracted 700 taels of gold, and also extracted cotton, copper, and cloth, from the six regions of Keriya, Kashgar, Khotan, Kucha, Yarkand, and Aksu as stated by Russian topographer Yakoff Filisoff. The Dzungars extracted over 50% of the wheat harvests of Muslims according to Qi-yi-shi (Chun Yuan), 30-40% of the wheat harvests of Muslims according to the Xiyu tuzhi, which labelled the tax as "plunder" of the Muslims. The Dzungars also extorted extra taxes on cotton, silver, gold, and traded goods from the Muslims besides making them pay the official tax. "Wine, meat, and women" and "a parting gift" were forcibly extracted from the Uighurs daily by the Dzungars who went to physically gather the taxes from the Uighur Muslims, and if they dissatisfied with what they received, they would rape women, and loot and steal property and livestock. Gold necklaces, diamonds, pearls, and precious stones from India were extracted from the Uighurs under Dāniyāl Khoja by Cewang Arabtan when his daughter was getting married.

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.

Uighurs known as "tariyachin" were enslaved and were involuntarily moved to Ili and other parts of Dzungaria to engage in agricultural work on farms by the Dzungars, and the Dzungars heavily punished Muslims who tried to run away, viewing the Uighurs as inferiors. The Dzungars forced Turkic Muslim farmers who became their prisoners to move from southern Xinjiang (Altishahr) to northern Xinjiang (Dzungaria) to work on farms in Ili so that the Dzungars could benefit from the food grown at the farms.

Labor of all sorts and high taxes were imposed on the Uighurs moved to Ili. The Uighur merchants (Bo-de-er-ge) played crucial roles in commerce as middlemen between foreigners and Dzungar nobility but even then the Dzungars viewed them as inferior and "as slaves". It was said by Qianlong that ''During the heyday of the Dzungars, they [the Uighurs] were made to work like slaves, forced to abandon their former dwellings to come to Ili and made to rechannel the water to plant paddy. They served and paid taxes without daring to slacken. For years they have been harbouring hatred!''

It was mostly the Dzungar elite such as nobles, lamas, and officials who benefited from their looting of other peoples, eating well and being clothed well with spectacular temples being built, while the ordinary Dzungar herdsmen remained in poverty. It was a system of "racial and class oppression" by the Dzungars upon the common Uighurs, which led to Uighur opposition against Dzungar rule.

The Qing defeat of the Dzungars went hand in hand with the anti-Dzungar resistance of the ordinary Uighurs, "many of them, unable to bear their misery, which was like living in a sea of fire, fled but were not able to find a place to settle peacefully." The Uighurs carried out "acts of resistance" like hiding the goods which were collected as taxes or violently resisting the Dzungar Oirat tax collectors, but these incidents were infrequent and widespread anti-Dzungar opposition failed to materialize. Many opponents of Dzungar rule like Uighurs and some dissident Dzungars escaped and defected to Qing China during 1737-1754 and provided the Qing with intelligence on the Dzungars and voiced their grievances. 'Abdullāh Tarkhān Beg and his Hami Uighurs defected and submitted to Qing China after the Qing inflicted a devastating defeat at Chao-mo-do on the Dzungar leader Galdan in September 1696. The Uighur leader Emin Khoja (Amīn Khoja) of Turfan revolted against the Dzungars in 1720 while the Dzungars under Cewang Arabtan were being attacked by the Qing, and then he also defected and submitted to the Qing. The Uighurs in Kashgar under Yūsuf and his older brother Jahān Khoja of Yarkand revolted in 1754 against the Dzungars, but Jahān was taken prisoner by the Dzungars after he was betrayed by the Uch-Turfan Uighur Xi-bo-ke Khoja and Aksu Uighur Ayyūb Khoja. Kashgar and Yarkand were assaulted by 7,000 Khotan Uighurs under Sādiq, the son of Jahān Khoja. The Uighurs supported the 1755 Qing assault against the Dzungars in Ili, which occured at the same time as the Uighur revolts against the Dzungars. Uighurs like Emin Khoja, 'Abdu'l Mu'min and Yūsuf Beg supported the Qing attack against Davachi (Dawaji), the Dzungar Khan. The Uch-Turfan UighurnBeg Khojis (Huojisi) supported the Qing General Ban-di against in tricking Davachi and taking him prisoner. The Qing and Amin Khoja and his sons worked together to defeat the Dzungars under Amursana.

From the 17th century to the middle of the 18th century, between China proper and Transoxania, all the land was under the sway of the Dzungars. In Semirechye the Kyrgyz and Kazakahs were forcibly driven out by the Dzungars and the Kashgar Khanate was conquered. However, the Dzungar Empire was annihilated by Qing China from 1755-1758 in a formidable assault, ending the Central Asian states danger from the Dzungar menace.