Revolt of the Altishahr Khojas

The Revolt of the Altishahr Khojas was an uprising against the Qing dynasty of China, which broke out in 1757 during the reign of the Qianlong Emperor. The rebels were led by (also known as Hojijan, Huojizhan; nickname: "Younger Khoja" 小和卓), leader of the. Qing era documents refer to the event as the "Pacification of the Muslim regions". Hojijan and his brother, (also known as Buranidun, Boluonidu; nickname: "Elder Khoja" 大和卓), both held the Muslim title Khoja.

After the Qing conquest of Dzungaria at the end of the Dzungar–Qing Wars in 1755, the Khoja Brothers were released from Dzungar captivity whereupon they began to recruit followers in the Western Regions around Altishahr. Not long afterwards, the Khoit-Oirat prince Amursana rose up against the Qing and the Khoja Brothers used the opportunity to seize control of the south west part of Xinjiang.

In 1757, Hojijan killed the Qing Amindao. Qianlong retaliated the following year by sending troops to locations including Kuqa County, (modern day Yarkant County) and Hotan  to attack the Khoja brothers. In 1759, the rebel army fled west through the Pamir Mountains to Badakhshan (now part of north east Afghanistan) where it was captured and destroyed by the ruling Sultan Shah, causing the revolt to subside.

With the revolt pacified, the Qing completed the reintegration of their territory in one of Qianlong's Ten Great Campaigns. The end of the conflict saw the restoration of the territory south of the Tian Shan to Qing control meaning that the Qing now controlled the whole of Xinjiang.

After the appointment of an the Xinjiang area remained peaceful for the next 60 years.

The White Mountain Khoja and the Zhuo Clan
The ancestor of the Khoja brothers was Ahmad Kasani (1461–1542) also known as Makhdūm-i`Azam, "the Great Master" of the Central Asian Naqshbandi Sufi Sect. Kasani claimed to be a descendant of Muhammad through his daughter whose offspring were known as the Khojas. The family was in turn divided into the and the  (formerly known as the Ishaqiyya Khojas and the Afaqiyya Khojas respectively). Together they were known as the Altishahr ("Tarim Basin") Khojas.

In the middle of the Ming dynasty (1368-1644), the Black Mountain Khoja received approval from the ruling Yarkand Khanate for the Altishahr or Tarim Basin area south of the Tian Shan range in the Western Regions to convert to Islam. In the mid-17th century, the White Mountain Khoja leader Muhammed Yusef Khoja (d. 1653) came from Central Asia to Kashgar to prosleytze only to be driven out by the Yarkand Khanate and the Black Mountain Khojas. Yusef Khoja's son Afaq Khoja escaped to Hezhou (modern day Linxia City) in China's Gansu Province. From there, he went to Tibet to obtain the support of the 5th Dalai Lama and the Dzunghar Mongols under Galdan Boshugtu Khan.

In 1680, during the reign of the Qing Kangxi Emperor, the Dzungars under Galdan Boshugtu Khan, with the help of Afaq Khoja, invaded Yarkand and deposed the ruling Khan, Ismail Khan. Galden then installed Abd ar-Rashid Khan II as Khan of Yarkand. Afaq Khoja soon afterwards fled from Yarkand following discord with the new ruler. Two years later, in 1682, riots erupted in Yarkand causing Abd ar-Rashid Khan II to flee to Ili. His younger brother Muhammad Amin then became Khan.

The riots of around 1682 led to the overthrow of Muhammad Amin Khan by the followers of Afaq Khoja, whose son Yahya Khoja became the ruler of Yarkand and Kashgar.

Two years later, Afaq Khoja died and the Kashgar region sank into a civil war involving the Yarkand Khanate, White Mountain Khoja, Kyrgyz and the local begs.

After Tsewang Rabtan succeeded to the leadership of the Dzungar Khanate in 1697 he imprisoned the descendants of the Altishahr Khojas in what is now known as Ili Kazakh Autonomous Prefecture. When Galdan Tseren came to power in 1727, he gave Black Mountain Khoja, Daniyal responsibility for the political and economic affairs of Yarkand and Kashgar. At the same time, Afaq Khoja's grandson Mahmud died in captivity. Afaq's second grandson, the "Elder Khoja", was imprisoned east of Yili at Elinhabi'erga (now Yilianhabi'ergaishan ) in the custody of the local Dzungar Tribal Administrator or Zaisang , Abagasi  and his brother Hadan.

Dawachi and Amursana split
After Galdan Tseren died in 1745, the Dzungar Khanate fell into internecine warfare. In the end, Dawachi, who was the grandson of Khong Tayiji Tsewang Rabtan's cousin Tsering Dhondup, became Khan. His comrade in arms, taisha or prince of the Khoit Dzungar tribe, Amursana, was richly rewarded for his loyalty.

However, in 1754, Dawachi and Amursana quarreled and the latter defected to the Qing, taking with him 5,000 soldiers and 20,000 women and children. He then demanded permission to travel to Beijing and seek the emperor's assistance in defeating Dawachi and retaking Ili and neighbouring Kashgar. Amursana's persuasive manner and Qianlongs's ambition and love for military renown meant that in the end he agreed, throwing in a princedom of the first degree, which entitled Amursana to double stipends and privileges, as a bonus.

Surrender of the Dzungars
In the first lunar month of 1755, two units of the Qing army, each consisting of 25,000 men carrying two months' of rations per man, entered Dzungaria from two different directions to destroy Dawachi's army and retake the territory. The Northern Route Army under commander comprised  Amursana, Amban  and   while  Salar  and Minister of the Interior  Erong'an  formed the Western Route Army with the West Pacifying General   in command. The two armies linked up at Boluotala (now the Bortala Mongol Autonomous Prefecture). During the subsequent march, Abagasi and Hadan among others surrendered to the Qing forces.

On 8April 1755, Buranidun surrendered to Salar's Western Route Army saying "At the time of Galdan Tseren, my father was imprisoned and thus far I have not been released. I will bring perhaps 30 of my households to surrender to the emperor and become his servants" Not long afterwards, the Younger Khoja,, surrendered to Ban Di with Hadan.

In May, Qing forces entered Huocheng County in Ili. Ban Di planned to send Buranidun to Beijing for presentation to the emperor while Hojijan would be kept in Ili in the care of the nomadic Muslim Taranchi.

The Us Beg Khojis received orders from Ban Di to establish sentry posts on the mountain passes into the Tarim Basin. When a further order to prepare for war arrived, Khojis' troops hid in the woods while his younger brother was dispatched to take wine and horses to Davachi—who when he arrived was seized along with his men and his son Lobja. The prisoners were then escorted under guard to the Qing barracks by Khojis and 200 of his men. Dawachi's capture effectively marked the end of the Dzungar Khanate.

At the same time, Kashgar Black Mountain Khoja Yusuf (second son of Daniyal) marched north. Aksu's  Abd-Qwabu (Khojis' elder brother) suggested to Ban Di that the Qing Army send an emissary along with them during the transport of the Khoja brothers to Kashgar. Abodouguabo further announced his appointment as ruler of the area at the behest of Qianlong. As a result, Ban Di dispatched the Imperial Bodyguard, Tuoluntai, and Khojis as protective escort on the journey south to Kashgar and Yarkand. Hojijan was to remain in Ili to supervise of Khojis' clan. Troops would gather at Uqturpan County to defeat the northern Black Mountain Khoja then head south. Once in Kashgar Hakim Beg would take the surrender of the city. Although Xinjiang's Black Mountain Khoja leader Jihan Khoja, also known as Yaqub, and Yusuf's eldest brother, put up a fierce defence of Kashgar until he was finally killed.

Amursana's Revolt
With Dawachi on his way to Beijing as a captive, Amursana now saw an opportunity to establish himself as the new Dzungar Khan with control of the four Oirat tribes of Dzungaria. Qianlong had other ideas. The emperor knew that Amursana had long had his sights set on Dzungaria but "had not dared to do anything rash." As a result, before the military expedition to Ili had set out and fearing the rise of a new Mongolian empire, Qialong had proclaimed that the four Oirat clans of Dzungaria would be resettled in their own territory each with their own Khan appointed directly by Beijing. Amursana spurned the offer of khanship over the Khoits and told Ban Di to inform the Emperor that he wanted control of all the Oirats. Amursana received orders to return to Beijing but sensing that if he left Ili he might never be able to return, on 24September 1755 he escaped from his escort en route to the Qing imperial resort at Chengde and returned to Tarbaghatai (now Tacheng in Xinjiang, China), 400 km east of Ürümqi. The Ili zaisang or chief and his lamas then seized the city. In the chaos, Hojijan led a band of Uyghur and escaped from the Ili basin. Other White Mountain Khojas imprisoned in Dzugaria including Ḥusein (Hojijan's uncle) and Muḥammad  were unwilling to follow Hojijan and instead fled to Kokand and other places. At the end of the year, Amursana sent an envoy to tell Buranidun of the fall of Ili. Mongolian soldiers Tuoluntai and Tegusi (Salar's elder brother) were captured by Buranidun.

In March 1756, West Pacifying General Celeng arrived with the Western Route Army to recapture Ili. Amursana fled into the Kazakh Khanate as the tables were once again turned on him. Hojijan and Buranidun united the local population in May, then the Younger Khoja killed Amursana's envoy. Tuoluntai defected to the rebel side and was sent to ascertain the strength of the Qing Garrison in Ili.

Course of events
Hojijan sought independence from the Qing regime and told the local clan leaders: "I have just escaped from the slavery of the Dzungars; now it seems I must surrender to the Qing and pay tribute. Although inferior to ruling the region, working the land and defending the cities is sufficient resistance." Buranidun was unwilling to take on the Qing Army: "We were once Humiliated by Dzungaria; Without the aid of the Qing military, how could we have returned to our homeland? We must not turn our backs on kindness and fight with Qing."

An envoy sent by Hoijijan then killed Chagatai Khan descendant and former Yarkand chief, Yike Khoja and Hojijan took the title Batur Khan  after the founder of the Dzungar Khanate Erdeni Batur. Buranidun advised against the move: "My younger brother is the third generation of our family to be imprisoned by the Dzungars. Through the kindness of the Qing emperor, he was freed and has received further profound grace to be appointed the chief in the Muslim region. You will have to face the Qing alone and I will not obey you." Hojijan persisted with his view and differences arose between the two.