Dungan revolt (1862–77)

The Dungan Revolt (1862–77) or Hui Minorities War was a mainly ethnic war fought in 19th-century China. The term sometimes includes the Panthay Rebellion in Yunnan, which occurred during the same period. However, this article relates specifically to the uprising by members of the Muslim Hui and other Muslim ethnic groups in China's Shaanxi, Gansu and Ningxia Provinces, as well as in Xinjiang, between 1862 and 1877. The revolt arose over a pricing dispute involving bamboo poles, when a Han merchant selling to a Hui did not receive the amount demanded for the goods.

The uprising occurred on the western bank of the Yellow River in Shaanxi, Gansu and Ningxia, but excluded Xinjiang Province. A chaotic affair, it often involved diverse warring bands and military leaders with no common cause or a single specific goal. A common misconception is that the revolt was directed against the Qing dynasty, but no evidence shows that the rebels intended to attack the capital, Beijing, or to overthrow the entire Qing government. When the rebellion failed, mass emigration of the Dungan people from Ili to Imperial Russia ensued.

Nomenclature
In this article "Dungan people" refers specifically to Hui people, who are a predominantly Muslim ethnic group in China. They are sometimes called "Chinese Muslims" and should not to be confused with the "Turkestanis" or "Turkic" people mentioned, who are Uyghurs, Kazakhs, Kyrgyzs, Tatars and Uzbeks amongst others.

Anachronisms
The ethnic group now known as Uyghur people was not known by that name before the 20th century. The Uzbeks of Yaqub Beg were called "Andijanis" or "Kokandis", while the Uyghurs in the Tarim Basin were known as "Turki". Uyghur immigrants from the Tarim Basin to Ili were called "Taranchi". The modern name "Uyghur" was assigned to this ethnic group by the Soviet Union in 1921 at a conference in Tashkent, with the name "Uyghur" taken from the old Uyghur Khaganate. As a result, sources from the period of the Dungan revolt make no mentions of Uyghurs.

Although "Hui" was (and is) the Chinese name for Muslim people of Han ethnic background, Europeans commonly referred to them as "Dungan" or "Tungan" during the Dungan revolt.

Background
The Dungan Revolt by the Hui occurred because of racial antagonism and class warfare, not purely religious strife as is sometimes mistakenly assumed.

When the Qing dynasty invaded the Ming dynasty in 1644, Muslim Ming loyalists in Gansu led by Muslim leaders Milayin and Ding Guodong led a revolt in 1646 against the Qing during the Milayin rebellion in order to drive the Qing out and restore the Ming Prince of Yanchang Zhu Shichuan to the throne as the emperor. The Muslim Ming loyalists were supported by Hami's Sultan Sa'id Baba and his son Prince Turumtay. The Muslim Ming loyalists were joined by Tibetans and Han Chinese in the revolt. After fierce fighting, and negotiations, a peace agreement was agreed on in 1649, and Milayan and Ding nominally pledged alleigance to the Qing and were given ranks as members of the Qing military. When other Ming loyalists in southern China made a resurgence and the Qing were forced to withdraw their forces from Gansu to fight them, Milayan and Ding once again took up arms and rebelled against the Qing. The Muslim Ming loyalists were then crushed by the Qing with 100,000 of them, including Milayin, Ding Guodong, and Turumtay killed in battle.

The Confucian Hui Muslim scholar Ma Zhu (1640–1710) served with the southern Ming loyalists against the Qing.

In Guangzhou, the national monuments known as "The Muslim's Loyal Trio" are the tombs of Ming loyalist Muslims who were martyred while fighting in battle against the Qing in the Manchu conquest of China in Guangzhou.

During the Qianlong era (1735–1796), scholar Wei Shu commented on Jiang Tong's  essay Xironglun  that if the Muslims did not migrate, they would end up like the Five Hu, who overthrew the Western Jin with the result an ethnic rather than religious conflict breaking out between the Five Hu and the Han Chinese. During the Qianlong Emperor's reign there were clashes between the Qing authorities and the Jahriyya Sufi sect, but not with the majority non-Sufi Sunnis or the Khafiyya Sufis.

Chinese Muslims had travelled to West Asia for many years prior to the Hui Minorities' War. In the 18th century several prominent Muslim clerics from Gansu studied in Mecca and Yemen under Naqshbandi Sufi teachers. Two different forms of Sufism were brought back to northwest China by two charismatic Hui sheikhs: Khafiya (also spelled Khafiyya or Khufiyah; ), associated with Ma Laichi (1681–1766), and the more radical Jahriyya (also spelled Jahriya, Jahariyya, Jahariyah, etc.; or ), founded by Ma Mingxin (1719?-1781). These coexisted with the more traditional, non-Sufi Sunni practices, centered around local mosques and known as gedimu (qadim, or ). The Khafiya school and non-Sufi gedimu tradition—both tolerated by Qing authorities—were referred to as "Old Teaching", while Jahriya, viewed by authorities as suspect, became known as the "New Teaching".

Disagreements between adherents of Khafiya and Jahriya, as well as perceived mismanagement, corruption and the anti-Sufi attitudes of Qing officials, resulted in uprisings by Hui and Salar followers of the New Teaching in 1781 and 1783, but these were promptly suppressed. Hostilities between different groups of Sufis contributed to the violent atmosphere before the Dungan revolt between 1862 and 1877.

Course of the rebellion
As Taiping troops approached southeastern Shaanxi in the spring of 1862, the local Han Chinese, encouraged by the Qing government, formed Yong Ying militias to defend the region against the attackers. Afraid of the now-armed Han, the Muslims formed their own militia units as a response.

According to modern researchers, the Dungan rebellion began in 1862, not as a planned uprising but as a succession of local brawls and riots triggered by trivial causes. There were also rumors—false, as it turned out—spread that the Hui Muslims were aiding the Taiping Rebels. It is also said that the Hui Ma Hsiao-shih claimed that the Shaanxi Muslim rebellion was connected to the Taiping.

Many Green Standard Army troops of the Imperial army were Hui. One of the many brawls and riots that contributed to the rebellion was initiated by a fight triggered over the price of bamboo poles that a Han merchant was selling to a Hui. This eventually led to a massacre of Hui in many area villages when they refused to agree to the price of the poles. Afterwards, Hui mobs attacked Han and other Hui people who had not joined them in revolt. It was this seemingly trivial and unimportant dispute over bamboo poles that set off the full-scale revolt. A Manchu official noted that there were many non-rebellious Muslims who were loyal citizens, and warned the Qing court that exterminating all Muslims would force loyal ones to support the rebels and make the situation even worse. He said, "Among the Muslims, there are certainly evil ones, but doubtless there are also numerous peaceful, law-abiding people. If we decide to destroy them all, we are driving the good ones to join the rebels and create for ourselves an awesome, endless job of killing the Muslims".

Given the low prestige of the Qing dynasty and its armies being occupied elsewhere, the rebellion that began in the spring of 1862 in the Wei River valley spread rapidly throughout southeastern Shaanxi. By late June 1862, organized Muslim bands laid siege to Xi'an, which was not relieved by Qing general zh (sometimes written To-lung-a) until the fall of 1863. Dorongga was a Manchu bannerman in command of the army in Hunan Province. His forces defeated the Muslim rebels and completely destroyed their position in Shaanxi province, driving them out of the province to Gansu. Dorranga was later killed in action in March 1864 by Taiping rebels in Shaanxi.

The Governor-general of the region, En-lin, advised the Imperial government not to alienate Muslims. He officially made it clear that there was to be no mistreatment of or discrimination against Muslims, resulting in the implementation of a "policy of reconciliation". Muslim rebels tried to seize Lingzhou (present-day Lingwu) and Guyuan in several attacks as a result of false rumors spread by some Muslims that the government was going to kill all Muslims.

A vast number of Muslim refugees from Shaanxi fled to Gansu. Some of them formed the "Eighteen Great Battalions" in eastern Gansu, intending to fight their way back to their homes in Shaanxi. While the Hui rebels took over Gansu and Shaanxi, Yaqub Beg, who had fled from Kokand Khanate in 1865 or 1866 after losing Tashkent to the Russians, declared himself ruler of Kashgar and soon managed to take complete control of Xinjiang. In 1867 the Qing government sent one of its most capable commanders, General Zuo Zongtang—who had been instrumental in putting down the Taiping Rebellion—to Shaanxi. Zuo's approach was to pacify the region by promoting agriculture, especially the growing of cotton and grain, as well as supporting orthodox Confucian education. Due to the region's extreme poverty, Zuo had to rely on financial support from outside Northwestern China.

Zuo Zongtang called on the government to "support the armies in the northwest with the resources of the southeast", and arranged the finances of his planned expedition to conquer Gansu by obtaining loans worth millions of taels from foreign banks in the southeastern provinces. The loans from the banks would be paid back by fees and taxes levied by Chinese authorities on goods imported through their ports. Zuo also arranged for massive amounts of supplies to be available before he would go on the offensive. Ten thousand of the old Hunan Army troops commanded by General Zeng Guofan, were dispatched by him under Gen. Liu Songshan to Shaanxi to help General Zuo, who had already raised a 55,000-man army in Hunan before he began the final push to reconquer Gansu from the Dungan rebels. They participated along with other regional armies (the Szechuan, Anhui and Henan Armies also joined the battle). Zuo's forces consisted of the Hunan, Sichuan, Anhuiand Henan Armies, along with thousands of cavalry. The Hunan soldiers were expert marksmen and excelled in battlefield maneuvers under the command of Gen. Liu Songshan. Western military drill was experimented with, but Zuo decided to abandon it. The troops practiced "twice a day for ten days" with their western made guns.

The Lanzhou Arsenal was established in 1872 by Zuo Zongtang during the revolt and staffed by Cantonese. The Cantonese officer in charge of the arsenal was Lai Ch'ang, who was skilled at artillery. The facility manufactured "steel rifle-barreled breechloaders" and provided munitions for artillery and guns. The Muslim Jahriyya leader Ma Hualong controlled a massive Muslim trading network with many traders, having control over trade routes to multiple cities over various kinds of terrain. He monopolized trade in the area and used his wealth to purchase guns. Zuo Zongtang became suspicious of Ma's intentions, thinking that he wanted to seize control over the whole of Mongolia. Liu Songshan died in combat during an offensive against the hundreds of rebel forts protected by difficult terrain. Liu Jintang, his nephew, took over his command whereupon a temporary lull in the offensive set in. After suppressing the rebellion in Shaanxi and building up enough grain reserves to feed his army, Zuo attacked Ma Hualong. General Liu Jintang led the siege, bombarding the town over its walls with shells. The people of the town had to cannibalize dead bodies and eat grass roots to survive. Zuo's troops reached Ma's stronghold, Jinjibao in what was then north-eastern Gansu in September 1870, bringing Krupp siege guns with him. Zuo and Lai Ch'ang themselves directed the artillery fire against the city. Mines were also utilized. After a sixteen-month siege, Ma Hualong was forced to surrender in January 1871. Zuo sentenced Ma and over eighty of his officials to death by slicing. Thousands of Muslims were exiled to other parts of China.

Zuo's next target was Hezhou (now known as Linxia), the main center of the Hui people west of Lanzhou and a key point on the trade route between Gansu and Tibet. Hezhou was defended by the Hui forces of Ma Zhan'ao. As a pragmatic member of the Khafiya (Old Teaching) sect, he was ready to explore avenues for peaceful coexistence with the Qing government. When the revolt broke out, Ma Zhan'ao escorted Han Chinese to safety in Yixin, and did not attempt to conquer more territory during the rebellion. After successfully repulsing Zuo Zongtang's initial assault in 1872 and inflicting heavy losses on Zuo's army, Ma Zhan'ao offered to surrender his stronghold to the Qing, and provide assistance to the dynasty for the duration of the war. He managed to preserve his Dungan community with his diplomatic skill. While Zuo Zongtang pacified other areas by exiling the local Muslims (with the policy of "washing off the Muslims"  approach that had been long advocated by some officials), in Hezhou, the non-Muslim Han were the ones Zuo chose to relocate as a reward for Ma Zhan'ao and his Muslim troops helping the Qing crush Muslim rebels. Hezhou (Linxia) remains heavily Muslim to this day, achieving the status of Linxia Hui Autonomous Prefecture under the PRC. Other Dungan generals including Ma Qianling and Ma Haiyan also defected to the Qing side along with Ma Zhan'ao. Ma's son Ma Anliang also defected, and their Dungan forces assisted Zuo Zongtang's Qing forces in crushing the rebel dungans. Dong Fuxiang also defected to the Qing. He was in no sense a fanatical Muslim or even interested in rebellion, he merely gained support during the chaos and fought, just as many others did. He joined the Qing army of Zuo Zongtang in exchange for a Mandarinate. He acquired estates which were large.

Reinforced by the Dungan people of Hezhou, Zuo Zongtang planned to advance westward along the Hexi Corridor toward Xinjiang. However, he felt it necessary to first secure his left flank by taking Xining, which not only had a large Muslim community of its own, but also sheltered many of the refugees from Shaanxi. Xining fell after a three-month siege in late 1872. Its commander Ma Guiyuan was captured, and defenders were killed in the thousands. The Muslim population of Xining was spared but the Shaanxi refugees sheltering there were resettled to arable land in eastern and southern Gansu, which were isolated from other Muslim areas.



Despite repeated offers of amnesty, many Muslims continued to resist at Suzhou (Jiuquan), their last stronghold in the Hexi Corridor in west Gansu. The city was under the command of Ma Wenlu, who was originally from Xining. Many Hui people who had retreated from Shaanxi were also in the city. After securing his supply lines, Zuo Zongtang laid siege to Suzhou in September 1873 with 15,000 troops. The fortress could not withstand Zuo's siege guns and the city fell on October24. Zuo had 7,000 Hui people executed, and resettled the rest in southern Gansu, to ensure that the entire Gansu Corridor from Lanzhou to Dunhuang would remain Hui-free, thereby preventing the possibility of future collusion between the Muslims of Gansu and Shaanxi and those of Xinjiang. Han and Hui loyal to the Qing seized the land of Hui rebels in Shaanxi, so the Shannxi Hui were resettled in Zhanjiachuan in Gansu.

Confusion
The rebels were disorganized and without a common purpose. Some Han Chinese rebelled against the Qing state during the rebellion, and rebel bands fought each other. The main Hui rebel leader, Ma Hualong, was even granted a military rank and title during the rebellion by the Qing dynasty. It was only later when Zuo Zongtang launched his campaign to pacify the region, did he decide which rebels who surrendered were going to be executed, or spared.

Zuo Zongtang generally massacred New Teaching Jahriyya rebels, even if they surrendered, but spared Old Teaching Khafiya and Sunni Gedimu rebels. Ma Hualong belonged to the New Teaching school of thought, and Zuo executed him, while Hui generals belonging to the Old Teaching clique such as Ma Qianling, Ma Zhan'ao and Ma Anliang were granted amnesty and even promoted in the Qing military. Moreover, an army of Han Chinese rebels led by Dong Fuxiang surrendered and joined Zuo Zongtang. General Zuo accepted the surrender of Hui people belonging to the Old Teaching school, provided they surrendered large amounts of military equipment and supplies, and accepted relocation. He refused to accept the surrender of New Teaching Muslims who still believed in its tenets, since the Qing classified them as a dangerous heterodox cult, similar to the White Lotus Buddhists. Zuo said, "The only distinction is between the innocent and rebellious, there is none between Han and Hui".

The Qing authorities decreed that the Hui rebels who had taken part in violent attacks were merely heretics and not representative of the entire Hui population, just as the heretical White Lotus did not represent all Buddhists. Qing authorities decreed that there were two different Muslim sects, the "old" religion and "new" religion. The new were heretics and deviated from Islam in the same way that the White Lotus deviated from Buddhism and Daoism, and stated its intention to inform the Hui community that it was aware that the original Islamic religion was one united sect before the advent of new "heretics", saying they would separate Muslim rebels by which sect they belonged to.

Nature of the Rebellion
During the rebellion, some Hui people fought for the Qing against the rebels from the beginning. A Hui leader, Wang Dagui, fought on the side of the Qing dynasty against Hui rebels, and was rewarded for doing so, until he and his family were all killed by other Hui rebels. In addition, the Hui Chinese rebel leaders never called for Jihad, and never claimed that they wanted to establish an Islamic state. This stood in contrast to the Xinjiang Turki Muslims who called for Jihad. Instead of overthrowing the government, the rebels wanted to exact revenge from local corrupt officials and others who had done them injustices.

When Ma Hualong originally negotiated with the Qing authorities in 1866, he agreed to a "surrender", giving up thousands of foreign weapons, spears, swords, and 26 cannons. Ma assumed a new name signifying loyalty to the Dynasty, Ma Chaoqing. Mutushan, the Manchu official, hoped that this would lead to other Muslims following his lead and surrendering, however, Ma Hualong's surrender had no effect and the rebellion continued to spread. Even after Ma Hualong was sentenced to death, Zuo canceled the execution when Ma surrendered for the second time in 1871, surrendering all his weapons, such as cannons, gingalls, shotguns, and western weapons. Zuo also ordered him to convince other leaders to surrender. Zuo then discovered a hidden cache of 1,200 western weapons in Ma Hualong's headquarters in Jinjipao, and Ma failed to persuade the others to surrender. Thereafter Ma along with male members of his family and many of his officers were killed. Zuo then stated that he would accept the surrender of New Teaching Muslims who admitted that they were deceived, radicalized, and misled by its doctrines. Zuo excluded khalifas and mullas from the surrender.

As noted in the previous sections, Zuo relocated Han Chinese from Hezhou as a reward for the Hui leader Ma Zhan'ao after he and his followers surrendered and joined the Qing to crush the rebels. Zuo also moved Shaanxi Muslim refugees from Hezhou, only allowing native Gansu Muslims to stay behind. Ma Zhanao and his Hui forces were then recruited into the Green Standard Army of the Qing military.

Hui Muslims in non-rebellious areas
Hui Muslims living in areas that did not take part in the rebellion were completely unaffected by it, with no restrictions placed on them, nor did they try to join the rebels. Professor Hugh D. R. Baker stated in his book Hong Kong Images: People and Animals, that the Hui Muslim population of Beijing remained unaffected by the Muslim rebels during the Dungan revolt. Elisabeth Allès wrote that the relationship between Hui Muslim and Han peoples continued normally in the Henan area, with no ramifications or consequences from the Muslim rebellions of other areas. Allès wrote in the document Notes on some joking relationships between Hui and Han villages in Henan published by the French Center for Research on Contemporary China that "The major Muslim revolts in the middle of the nineteenth century which involved the Hui in Shaanxi, Gansu and Yunnan, as well as the Uyghurs in Xinjiang, do not seem to have had any direct effect on this region of the central plain."

Pre-rebellion situation
} By the 1860s, Xinjiang had been under Qing rule for a century. The area had been conquered in the late 1750s from the Dzungar Khanate whose core population, the Oirats, subsequently became the targets of genocide. However, as Xinjiang consisted mostly of semi-arid or desert lands, these were not attractive to potential Han settlers except some traders, so other people such as Uyghurs settled in the area. The whole of Xinjiang was divided into three administrative circuits:
 * The North-of-Tianshan Circuit, including the Ili basin and Dzungaria. This region roughly corresponds to the modern Ili Kazakh Autonomous Prefecture and included prefectures it controlled along with a few smaller adjacent prefectures.
 * The South-of-Tianshan Circuit . This included the "Eight cities" in turn comprising the "Four Western Cities" of Khotan, Yarkand, Yangihissar, Kashgar and the "Four Eastern Cities" (Ush, Aqsu, Kucha, Karashahr).
 * The Eastern Circuit, in eastern Xinjiang, centered around Urumqi.

Overall military command of all three circuits fell to the General of Ili, stationed in Huiyuan Cheng. He was also in charge of the civilian administration (directly in the North-of-Tianshan Circuit, and via local Muslim (Uyghur) begs in the South Circuit). However, the Eastern Circuit was subordinated in matters of civilian administration to Gansu Province.

During the Afaqi Khoja revolts there were multiple incursions by Afaqi khojas from Kokand into Kashgaria, similar to those of Jahangir Khoja in the 1820s and Wali Khan in 1857, meant that the government had increased troop levels in Xinjiang to some 50,000. Both Manchu and Han units were stationed in the province with the latter, mainly recruited in Shaanxi and Gansu, having a heavily Hui (Dungan) component. A large part of the Qing army in Xinjiang was based in the Nine Forts of the Ili Region, but there were also forts with Qing garrisons in most other cities of Xinjiang.

Maintaining this army involved much higher costs than the taxation of the local economy could sustainably provide, and required subsidies from the central government. Such support became unfeasible by the 1850-60s due to the costs of suppressing the Taiping and other rebellions in the Chinese heartland. The Qing authorities in Xinjiang responded by raising taxes, introducing new ones, and selling official posts to the highest bidders (e.g. that of governor of Yarkand to Rustam Beg of Khotan for 2,000 yambus, and that of Kucha to Sa'id Beg for 1,500 yambus). The new officeholders would then proceed to recoup their investment by fleecing their subject populations.

Increasing tax burdens and corruption only added to the discontent amongst the Xinjiang people, who had long suffered both from the maladministration of Qing officials and their local beg subordinates and from the destructive invasions of the khojas. Qing soldiers in Xinjiang, however, were still not paid on time or properly equipped.

With the start of the rebellion in Gansu and Shaanxi in 1862, rumors spread among the Hui (Dungans) of Xinjiang that the Qing authorities were preparing a wholesale preemptive slaughter of the Hui people in Xinjiang, or in a particular community. Opinions as to the veracity of these rumors vary: while the Tongzhi Emperor described them as "absurd" in his edict of September25, 1864, Muslim historians generally believe that massacres were indeed planned, if not by the imperial government then by various local authorities. Thus it was the Dungans who usually revolted in most Xinjiang towns, although the local Turkic people—Taranchis, Kyrgyzs, and Kazakhs—would usually quickly join the fray.

Multi-centric rebellion
The first spark of rebellion in Xinjiang proved small enough for the Qing authorities to easily extinguish it. On March17, 1863, some 200 Dungans from the village of Sandaohe (a few miles west of Suiding), supposedly provoked by a rumor of a preemptive Dungan massacre, attacked Tarchi ( now part of Huocheng County), one of the Nine Forts of the Ili Basin. The rebels seized weapons from the fort's armory and killed the soldiers of its garrison, but were soon defeated by government troops from other forts and were themselves slaughtered.

Rebellion broke out again the following year—this time, almost simultaneously in all three Circuits of Xinjiang—on a scale that made its suppression beyond the capability of the authorities.

On the night of June3–4, 1864, the Dungans of Kucha, one of the cities south of Tianshan, rose up and were soon joined by the local Turkic people. The Han fort, which, unlike many other Xinjiang locations, was located inside the town rather than outside it, fell within a few days. Government buildings were burnt and some 1000 Hans and 150 Mongols killed. As neither the Dungan nor Turkic leaders of the rebellion had sufficient authority over the entire community to become commonly recognized as a leader, the rebels instead choose a person who had not participated in the rebellion, but was known for his spiritual role: Rashidin (Rashīdīn) Khoja, a dervish and the custodian of the grave of his ancestor of saintly fame, Arshad-al-Din (? - 1364 or 65). Over the next three years, he sent military expeditions east and west in an attempt to bring the entire Tarim Basin under his control; however, his expansion plans were frustrated by Yaqub Beg.

Only three weeks after the events in Kucha, rebellion broke out in the Eastern Circuit. The Dungan soldiers of the Ürümqi garrison rebelled on June26, 1864, soon after learning about the Kucha rebellion. The two Dungan leaders were Tuo Ming (a.k.a. Tuo Delin), a New Teaching ahong from Gansu, and Suo Huanzhang, an officer who also had close ties to Hui religious leaders. Large parts of the city were destroyed, the tea warehouses burned, and the Manchu fortress besieged. The Ürümqi rebels then advanced westward through what is today Changji Hui Autonomous Prefecture, taking the cities of Manas (also known then as Suilai) on July17 (the Manchu fort there fell on September16) and Wusu (Qur Qarausu) on September29.

On October3, 1864, the Manchu fortress of Ürümqi also fell to the joint forces of Ürümqi and Kuchean rebels. In a pattern that was to repeat in other Han forts throughout the region, the Manchu commander, Pingžui, preferred to explode his gunpowder, killing himself and his family, rather than surrender.

After they learned of the Qing authorities' plan to disarm or kill them, the Dungan soldiers in Yarkand in Kashgaria rose up in the early hours of July26, 1864. Their first attack on the Manchu fort (which was outside of the walled Muslim city) failed, but it still cost the lives of 2,000 Qing soldiers and their families. In the morning, the Dungan soldiers entered the Muslim city, where some 7,000 Hans were massacred. The Dungans being numerically few compared to the local Turkic Muslims, they picked a somewhat neutral party—one Ghulam Husayn, a religious man from a Kabul noble family—as the puppet padishah.

By the early fall of 1864, the Dungans of the Ili Basin in the Northern Circuit also rose up, encouraged by the success of Ürümqi rebels at Wusu and Manas, and worried by the prospects of preemptive repressions by the local Manchu authorities. The zh, Cangcing, hated by the local population as a corrupt oppressor, was sacked by the Qing government after the defeat of his troops by the rebels at Wusu. Attempts by Mingsioi, Cangcing's replacement, to negotiate with the Dungans proved in vain. On November10, 1864, the Dungans rose both in Ningyuan (the "Taranchi Kuldja"), the commercial center of the region, and Huiyuan (the "Manchu Kuldja"), its military and administrative headquarters. Kulja's Taranchis (Turkic-speaking farmers who later formed part of the Uyghur people) joined in the rebellion. When the local Muslim Kazakhs and Kyrgyzs felt that the rebels had gained the upper hand, they joined them. Conversely, the Buddhist Kalmyks, and Xibes mostly remained loyal to the Qing government.

Ningyuan immediately fell to the Dungan and Turki rebels, but a strong government force at Huiyuan made the insurgents retreat after 12 days of heavy fighting in the streets of the city. The local Han Chinese, seeing the Manchus winning, joined forces with them. However, a counter-offensive by Qing forces failed. The imperial troops lost their artillery while Mingsioi barely escaped capture. With the fall of Wusu and Aksu, the Qing garrison, entrenched in the Huiyuan fortress was completely cut off from the rest of empire-controlled territory forcing Mingsioi to send his communications to Beijing via Russia.

While the Qing forces in Huiyuan successfully repelled the next attack of the rebels on 12December 1864, the rebellion continued to spread through the northern part of the province (Dzungaria), where the Kazakhs were glad to take revenge on the Kalmyk people that had ruled the area in the past.



For Chinese New Year 1865, the Hui leaders of Tacheng (Chuguchak) invited the local Qing authorities and Kalmyk nobles to assemble in the Hui mosque, in order to swear a mutual oath of peace. However, once the Manchus and Kalmyks were in the mosque, the Hui rebels seized the city armory, and started killing the Manchus. After two days of fighting, the Muslims gained control of the town, while the Manchus were besieged in the fortress. Nevertheless, wiith the help of the Kalmyks the Manchus were able to retake the Tacheng area by the fall of 1865. This time, it was the Hui rebels who were locked up in the mosque. The fighting resulted in the destruction of Tacheng and the surviving residents fleeing the town.

Both the Qing government in Beijing and the beleaguered Kulja officials asked the Russians for assistance against the rebels via the Russian envoy in Beijing, ru and the Russian commander in Semirechye, ru respectively. The Russians, however, were diplomatically non-committal. On the one hand, as Vlangali wrote to Saint Petersburg, a "complete refusal" would be bad for Russia's relations with Beijing; on the other, Russian generals in Central Asia generally felt that providing China with serious assistance against Xinjiang's Muslims would do nothing to improve Russia's problems with its own new Muslim subjects. Were the rebellion to succeed and lead to the creation of a permanent Hui state, having been on the Qing side of the former conflict would offer Russia no benefit in its relations with that new neighbor. The decision was thus made in Saint Petersburg in 1865 to avoid offering any serious help to the Qing, beyond agreeing to train Chinese soldiers in Siberia—should they send any—and to sell some grain to the defenders of Kuldja on credit. The main priority of the Russian government remained guarding its border with China and preventing any possibility of the spread of the rebellion into Russia's own domain.

Considering that offense is the best form of defense, Kolpakovsky suggested to his superiors in February 1865 that Russia should go beyond defending its border and move in force into Xinjiang's border area then seize the Chuguchak, Kuldja and Kashgar areas. These could then be colonized with Russian settlers—all to better protect the Romanov empire's other domains. The time was not ripe for such an adventure, however: as Foreign Minister Gorchakov noted, such a breach of neutrality would be not a good thing if China eventually recovered its rebel provinces.

Meanwhile, Qing forces in the Ili Valley did not fare well. In April 1865, the Huining (惠宁) fortress (today's zh, located between Yining and Huiyuan), fell to the rebels after a three-month siege. Its 8,000 Manchu, Xibe, and Solon defenders were massacred, and two survivors with their ears and noses cut off were sent to Huiyuan—the Qing's last stronghold in the valley—to tell the Governor-general the fate of Huining.

Most of the Huiyuan (Manchu Kulja) fell to the rebels on January8, 1866. The majority of the residents and garrison perished along with some 700 rebels. Mingsioi, still holding out in the Huiyuan fortress with the remainder of his troops, but having run out of food, sent a delegation to the rebels, bearing a gift of 40 sycees of silver and four boxes of green tea, and offered to surrender, provided the rebels guaranteed their lives and allowed them to keep their allegiance to the Qing government. Twelve Manchu officials with their families left the citadel along with the delegation. The Huis and Taranchis received them and allowed the refugees from Huiyuan to settle in Yining ("the Old Kuldja"). However, the rebels would not accept Mingsioi's conditions, requiring instead that he surrender immediately and recognize the authority of the rebels. Since Mingsioi had rejected the rebels' proposal, they immediately stormed the citadel. On March3, the rebels having broken into the citadel, Mingsioi assembled his family and staff in his mansion, and blew it up, dying under its ruins. This was the temporary end, for the time being, of Qing rule in the Ili Valley.

Yaqub Beg in Kashgaria
As noted by Muslim sources, the Qing authorities in Kashgar had all along intended to eliminate local Dungans, and managed to carry out their preemptive massacre in the summer of 1864. This weakening of the local Dungan contingent was possibly the reason why the initial rebellion had not been as successful in this area as in the rest of the province. Although the Dungan rebels were able to seize Yangihissar, neither they nor the Kyrgyzs of Siddiq Beg could break into either the Manchu forts outside Yangihissar and Kashgar, nor into the walled Muslim city of Kashgar itself, which was held by Qutluq Beg, a local Muslim appointee of the Qing.

Unable to take control of the region on their own, the Dungans and Kyrgyzs turned for help to Kokand's ruler Alim Quli. Assistance arrived in early 1865 in both spiritual and material form. Spiritual aid came in the person of Buzurg Khoja (also known as Buzurg Khan), a member of the influential Afaqis family of khojas, whose religious authority could be expected to raise the rebellious spirit of the populace. He was heir to a long family tradition of starting mischief in Kashgaria, being a son of Jahangir Khoja and brother of Wali Khan Khoja. Material assistance—as well as the expected conduit of Kokandian influence in Kashgaria—consisted of Yaqub Beg, a young but already well known Kokandian military commander, with an entourage of a few dozen Kokandian soldiers, who became known in Kashgaria as Andijanis.

Although Siddiq Beg's Kyrgyzs had already taken the Muslim town of Kashgar by the time Buzurg Khoja and Yaqub Beg arrived, he had to allow the popular khoja to settle in the former governor's residence (the urda). Siddiq's attempts to assert his dominance were crushed by Yaqub Beg's and Buzurg's forces. The Kyrgyzs then had to accept Yaqub's authority.

With his small, but comparatively well trained and disciplined army consisting of local Dungans and Kashgarian Turkic people (Uighurs, in modern terms), their Kyrgyz allies, Yaqub's own Kokandians, as well as some 200 soldiers sent by the ruler of Badakhshan, Yaqub Beg was able not only to take the Manchu fortress and the Han Chinese town of Kashgar during 1865 (the Manchu commander in Kashgar, as usual, blowing himself up), but to defeat a much larger force sent by the Rashidin of Kucha, who sought domination of the Tarim Basin region for himself.

While Yaqub Beg asserted his authority over Kashgaria, the situation back home in Kokand changed radically. In May 1865, Alim Quli lost his life while defending Tashkent against the Russians. Many of his soldiers (primarily, of Kyrgyz and Kipchak background) deemed it advisable to flee to the comparative safety of Kashgaria. They appeared at the borders of Yaqub Beg's domain in early September 1865. Afghan warriors also assisted Yaqub Beg. Yaqub Beg's rule was unpopular among the natives with one of the local Kashgaris, a warrior and a chieftain's son, commenting: "During the Chinese rule there was everything; there is nothing now." There was also a falling-off in trade.

The local Uyghurs of Altishahr came to view Yaqub Beg as a Kokandi foreigner and his Kokandi associates behaved ruthlessly to the local Uyghurs, an anti Yaqub Beg poem was written by the Uyghur:

From Peking the Chinese came, like stars in the heaven. The Andijanis rose and fled, like pigs in the forest. They came in vain and left in vain, the Andijanis! They went away scared and languidly, the Andijanis! Every day they took a virgin, and They went hunting for beauties. They played with the dancing boys, Which the Holy Law has forbidden.

Yaqub Beg's Kashgaria declares Jihad against the Dungans
Taranchi Turkic Muslims in Xinjiang initially cooperated with the Dungans (Hui people) when they rose in revolt, but later abandoned them after the Hui attempted to subject the entire region to their rule. The Taranchi massacred the Dungans at Kuldja and drove the rest through the Talk pass to the Ili Valley. The Hui people in Xinjiang where neither trusted by the Qing authorities nor the Turkestani Muslims.

Yaqub Beg's Kokandi Andijani Uzbek forces declared a Jihad against Dungan rebels under T'o Ming (Tuo Ming a.k.a. Daud Khalifa). Fighting broke out between Dungan and Kokandi Uzbek rebels in Xinjiang. Yaqub Beg enlisted Han militia under Xu Xuegong in order to fight against the Dungan troops under T'o Ming. T'o Ming's Dungan forces were defeated at the Battle of Urumqi (1870) as part of Yaqub Beg's plan to conquer Dzungaria and seize all Dungan territory. Poems were written about the victories of Yaqub Beg's forces over the Hans and the Dungans. Yakub Beg seized Aksu from Dungan forces and forced them north of the Tian Shan, committing massacres upon the Dungan people (Tunganis). Independent Han Chinese militia who were not affiliated with the Qing government joined both the Turkic forces under Yaqub Beg, and the Dungan rebels. In 1870, Yaqub Beg had 1,500 Han Chinese troops with his Turkic forces attacking Dungans in Ürümqi. The following year, the Han Chinese militia joined the Dungans in fighting against Turkic forces.

Foreign relations of Kashgaria Yaqub Beg
Russia and Britain signed several treaties with Yaqub Beg's regime in Kashgar with Yaqub seeking to secure British and Russian aid for his government.

Relations with Russia
Relations between Yaqub Beg and the Russian Empire alternated between fighting and peaceful diplomatic exchanges.

The Russians detested the native population of Kashgar because of their elite's close contacts with the Kokand Khans who had recently been expelled during the Russian conquest of Turkestan. This animosity would have ruined Yaqub Beg had he sought extensive aid from them as he had originally intended.

Ottoman and British support
The Ottoman Empire and the British Empire both recognized Yaqub Beg's state and supplied him with thousands of guns. British diplomats Robert Barkley Shaw and Thomas Douglas Forsyth to Kashgar in 1868 and 1870 respectively, aroused British interest for Ya'qub's regime and the British concluded a commercial treaty with the emir in 1874.

Qing reconquest of Xinjiang
The Qing decided to reconquer Xinjiang in the late 1870s. Zuo Zongtang, previously a general in the Xiang Army, was the commander in chief of all Qing troops participating in this counterinsurgency. His subordinates were the Han Chinese General Liu Jintang and Manchu Jin Shun. As Zuo Zongtang moved into Xinjiang to crush the Muslim rebels under Yaqub Beg, he was joined by Dungan (Hui) General Ma Anliang and General Dong Fuxiang. Qing forces entered Ürümqi unopposed. Yaqub's subordinates defected to the Qing or fled as his forces started to fall apart, and the oasis fell easily to the Qing troops. The mass retreat of the rebel army shrank their sphere of control smaller and smaller. Yaqub Beg lost more than 20,000 men either though desertion or at the hands of the enemy. In October, Jin Shun resumed his forward movement and encountered no serious opposition. General Zuo appeared before the walls of Aksu, the bulwark of Kashgaria on the east, and its commandant abandoned his post at the first onset. Qing army then advanced on Uqturpan, which also surrendered without a blow. Early in December all Qing troops began their last attack against the capital city of the Kashgarian regime. The rebel troops were defeated and the residual troops started to withdraw to Yarkant, whence they fled to Russian territory. With the fall of Kashgaria Qing's reconquest of Xinjiang was completed. No further rebellion was encountered, and the reestablished Qing authorities began the task of recovery and reorganization, including the establishment of the Xinjiang province in 1884.

Punishment
Yaqub Beg and his son Ishana's corpses were "burned to cinders" in full public view. This angered the population in Kashgar, but Qing troops quashed a rebellious plot by Hakim Khan. Surviving members of Yaqub Beg's family included his four sons, four grandchildren (two grandsons and two granddaughters), and four wives. They either died in prison in Lanzhou, Gansu or were killed by the Qing government. His sons Yima Kuli, K'ati Kuli, Maiti Kuli, and grandson Aisan Ahung were the only survivors alive in 1879. They were all underage children at that time. They were put on trial and sentenced to an agonizing death if they were found to be complicit in their father's rebellious "sedition". If they were innocent, they were to be sentenced to castration and servitude as eunuch slaves to the Qing troops. Afterwards, when they reached the age of 11 years old, they would be handed over to the Imperial Household to be executed or castrated. In 1879, it was confirmed that the sentence of castration was carried out, Yaqub Beg's son and grandsons were castrated by the Chinese court in 1879 and turned into eunuchs to work in the Imperial Palace.

Memorials
On January25, 1891, a temple was constructed by Liu Jintang. He had been one of the generals participating in the counterinsurgency against the Dungan revolt and at that time he was the Governor of Gansu. The temple was built in the capital of Gansu as a memorial to the victims who died during the Dungan revolt in Kashgaria and Dzungaria. The victims numbered 24,838 and included officials, peasants, and members of all social classes and ethnic groups. It was named Chun Yi Ci. Another temple was already built in honor of the Xiang Army soldiers who fought during the revolt.

Flight of the Dungans to the Russian Empire
The failure of the revolt led to the immigration of some Hui people into Imperial Russia. According to Rimsky-Korsakoff (1992), three separate groups of the Hui people fled to the Russian Empire across the Tian Shan during the exceptionally severe winter of 1877/78:
 * The first group of some 1000 people originally from Turpan in Xinjiang and led by Ma Daren (马大人), also known as Ma Da-lao-ye (马大老爷) reached Osh in southern Kyrgyzstan.
 * The second group of 1130 people originally from Didaozhou (狄道州) in Gansu led by ahong A Yelaoren (阿爷老人), were settled in the spring of 1878 in the village of Yardyk some 15 km from Karakol in Eastern Kyrgyzstan.
 * The third group, originally from Shaanxi and led by Bai Yanhu (白彦虎; also spelt Bo Yanhu; 1829(?)-1882), one of the leaders of the rebellion, were settled in the village of Karakunuz (now Masanchi), in the modern Zhambyl Province of Kazakhstan. Masanchi is located on the northern (Kazakh) side of the Chu River, 8 km north of the city of Tokmak in north-western Kyrgyzstan. This group numbered 3314 on arrival.

Another wave of immigration followed in the early 1880s. In accordance with the terms of the Treaty of Saint Petersburg signed in February 1881, which required the withdrawal of the Russian troops from the Upper Ili Basin (the Kulja area), the Hui and Taranchi (Uighur) people of the region were allowed to opt for moving to the Russian side of the border. Most people choose that option and according to Russian statistics, 4,682 Hui moved to the Russian Empire under the treaty. They migrated in many small groups between 1881 and 1883, settling in the village of Sokuluk some 30 km west of Bishkek, as well as at a number of points between the Chinese border and Sokuluk, in south-eastern Kazakhstan and northern Kyrgyzstan.

The descendants of these rebels and refugees still live in Kyrgyzstan and neighboring parts of Kazakhstan  and Uzbekistan. They still call themselves the Hui people (Huizu), but to the outsiders they are known as Dungan, which means Eastern Gansu in Chinese.

After the Sino-Soviet split, Soviet propaganda writers such as Rais Abdulkhakovich Tuzmukhamedov called the Dungan revolt (1862–1877) a "national liberation movement" for their political purposes.

Increase in Hui military power
The rebellion increased the power of Hui Generals and military men in the Qing Empire. Many Hui Generals who served in the campaign were promoted by the Emperor, including Ma Anliang, and Dong Fuxiang. This led Hui armies to fight again in the Dungan Revolt (1895) against the rebels, and in the Boxer Rebellion against Christian Western Armies. The Hui Gansu Braves rose to fame for protecting the Emperor and Polytheist Han Chinese against the Chinese Christians and Westerners.

Dungan rebels were known to avoid attacking Christians and people took refuge in Christian churches. Some therefore attribute the mass increase of Catholics and Protestant population along the west bank of yellow river in Gansu and Shanxi to people sought refuge in churches. Yet another possible reason is Chinese Christians, despite self-imposed ethnic identity, were classified by Manchurian too as Hui along with Muslims and Jews, per a similar registration system to that of the Mongolian Yuan.

Ma Fuxiang, Ma Qi, and Ma Bufang were descendants of the Hui military men from this era, and they became important and high ranking Generals in the Republic of China National Revolutionary Army.

Border dispute with Russia
After General Zuo Zongtang and his Xiang Army crushed the rebels, they demanded Russia return the city of Kuldja in Xinjiang, which they had occupied. Zuo was outspoken in calling for war against Russia and hoped to settle the matter by attacking Russian forces in Xinjiang. In 1878, tensions in the area increased. Zuo massed Qing troops toward the Russian occupied Kuldja. Chinese forces also fired on Russian expeditionary forces originating from Yart Vernaic, expelling them, which resulted in a Russian retreat.

After the incompetent negotiator Chong Hou was bribed by the Russians, he signed a treaty granting Russia extraterritorial rights, consulates, control over trade, and an indemnity—all without permission from the Qing government. Thereafter a massive uproar by the Chinese literati ensued with some individuals calling for the execution of Chong Hou. Zhang Zhidong demanded the beheading of Chong Hou and that China stand up to the government of Russia and declare the treaty invalid. He also stated that "The Russians must be considered extremely covetous and truculent in making the demands and Chong Hou was extremely stupid and absurd in accepting them . . . . If we insist on changing the treaty, there may not be trouble; if we do not, we are unworthy to be called a state.' The Chinese literati demanded the government mobilize armed forces against Russia. The government acted after this, giving important posts to officers from the Xiang Army. Charles Gordon became an advisor to the Chinese.

The Russians were in a very bad diplomatic and military position vis-a-vis China. Russia feared the threat of military conflict, which forced them into diplomatic negotiations instead.

Western explorers
Ney Elias traveled through the area of the rebellions.

General

 * Kim Hodong, "Holy War in China: The Muslim Rebellion and State in Chinese Central Asia, 1864-1877". Stanford University Press (March 2004). ISBN 0-8047-4884-5. (Searchable text available on Amazon.com)
 * Bruce Elleman, "Modern Chinese Warfare (Warfare and History)". 2001, ISBN 0-415-21474-2. (p. 65-, the section on "The Tungan Rebellion, 1862-73").

Background, and the war in Shaanxi-Gansu

 * Jonathan N. Lipman, "Familiar Strangers: A History of Muslims in Northwest China (Studies on Ethnic Groups in China)", University of Washington Press (February 1998), ISBN 0-295-97644-6. (Searchable text available on Amazon.com)

War in Xinjiang, and Russian involvement

 * "Imperial Rivals: China, Russia, and Their Disputed Frontier", by Sarah C. M. Paine (1996) ISBN 1-56324-723-2
 * "The Ili Crisis: A Study of Sino-Russian Diplomacy, 1871-1881", by Immanuel Chung-yueh Hsü (1966)
 * "The Ili Crisis: A Study of Sino-Russian Diplomacy, 1871-1881", by Immanuel Chung-yueh Hsü (1966)

Russian

 * V.A. Moiseev, "Muslim Rebellion in Xinjiang and Russia's policy (1864-1871)", in "Россия и Китай в Центральной Азии (вторая половина XIX в. - 1917 гг.)" (Russia and China in Central Asia (second half of the 19 c. thru 1917). Barnaul, Azbuka Publishers, 2003. ISBN 5-93957-025-9

Dungan emigration

 * Svetlana Rimsky-Korsakoff Dyer. Karakunuz: An Early Settlement of the Chinese Muslims in Russia, with an English translation of V. Tsibuzgin and A.Shmakov's work. "Asian Folklore Studies", Vol. 51 (1992), pp. 243–279.
 * The "Shaanxi Village" in Kazakhstan (Chinabroadcast.cn)