The First Dzungar–Qing War was a military conflict fought from 1687 to 1697 between the
Dzungar Khanate and an alliance of the
Qing dynasty and the northern
Khalkhas, remnants of the
Northern Yuan dynasty. The war resulted from a Dzungar attack on the Northern Yuan dynasty based in
Outer Mongolia, who were heavily defeated in 1688. Their rulers and twenty thousand refugees fled south to the Qing dynasty, which feared the growing power of the Dzungar state. Motivated by the opportunity to gain control over Mongolia and by the threat posed to them by a strong, unified Mongol state such as the Oirats threatened to form, the Qing sent their army north to subdue the Dzungars in 1690. Qing scouts attacked a Dzungar party north of the Great Wall. However, this proved to be the main Dzungar army, which destroyed the Qing detachment easily. A large Qing army under
Prince Fuquan advanced North into
Inner Mongolia, hoping to trap and crush the mobile Dzungar army. However, they were constrained by bad weather and difficult terrain. It took some Qing troops twelve days to cross the Gobi Desert, and the horses were left exhausted. Running low on supplies, the Qing finally confronted the Dzungars at
Ulan Butung in September 1690. Although outnumbered 5 to 1, the Dzungars formed a camel wall, beat back a pair of artillery-supported Qing assaults, and escaped into the hills. The Qing commander claimed victory, but his failure to completely destroy the Dzungar forces led to his dismissal and early retirement. Galdan was left in control of Mongolia from the
Selenga River in the north to
Khalkhyn Gol in the south. A pause in the conflict ensued. The Khalkha rulers declared themselves Qing vassals at
Dolon Nor (the site of
Shangdu, the pleasure palace of the Yuan Emperors) in 1691, a politically decisive step that officially ended the last remnants of the Yuan dynasty. It also allowed the Qing to assume the mantle of the
Genghisid khans, merging the Khalkha forces into the Qing army. The
Kangxi Emperor had now become determined to "exterminate" Galdan. Negotiations between the two sides bore little fruit. The Dzungars cast about for allies, making overtures to the Russians and various Mongol princes, but were rejected. Kangxi set about preparing the complex logistics necessary to support a planned 1696 expedition. This included procuring 1,333 carts, each carrying 6 shi of grain. Three armies eventually advanced north in 1696. One, under the command of Fiyanggu, numbering 30,000 and to be reinforced with a further 10,000, was to trap Galdan, while Kangxi personally led 32,000 men, including 235 cannon on camelback. A third, numbering 10,000, halted further to the east and would play no part in the coming campaign. The Dzungar army, heavily outnumbered and weakened by the
plague, was unable to offer serious resistance. Galdan's army attacked the western force at the
Battle of Jao Modo in May 1696, but was narrowly - albeit decisively- defeated. The Dzungar army, bereft of artillery, suffered heavily from Chinese musketry and cannon fire, eventually breaking. The battle ended in a victory for the Qing army, who captured 20,000 sheep and 40,000 cattle, and captured, killed or scattered all but 40-50 of the Dzungar army, effectively destroying them as a military force. Galdan himself had managed to escape from an enemy encirclement, thanks in part to a counterattack led by his wife,
Queen Anu. Galdan's wife was killed, and Galdan fled west to the
Altai Mountains, where later he attempted to surrender to the Qing, but died of the plague After the war, a Qing garrison was stationed in the area of present-day
Ulaanbaatar, and Khalkha Mongolia was placed under Qing rule.
Outer Mongolia was effectively incorporated into the Qing Empire. On the other hand,
Tsewang Rabtan, a long-time anti-Galdan Oirat chief, who had actually provided intelligence to the Qing ==Second Dzungar-Qing War, in Tibet==