# Song–Xia wars

The Song–Xia wars (Chinese: 宋夏戰爭) were a series of military conflicts fought by the Northern Song dynasty, Western Xia dynasty, and Liao dynasty from the late 10th century to early 12th century. Although sporadic conflicts would continue, the Northern Song lost their land border with the Western Xia after the Jin–Song wars and the Jingkang Incident of 1127 which saw the fall of their capital, Kaifeng, to the Jurchen-led Jin dynasty.

## Jiqian's rebellion (982–1004)

In 982, the ruler of the Dingnan Jiedushi, Li Jipeng, decided to submit to the Song dynasty and exchange his title for a comfortable existence in Kaifeng. His brother, Li Jiqian, did not agree to this and refused to submit to Song administration. Jiqian led a group of bandit holdouts and resisted Song control. In 984, the Song attacked his camp and captured his mother and wife, but he narrowly escaped. He rebounded from this defeat by capturing Yinzhou in 985.
Along with Yinzhou, Jiqian captured large amounts of supply, allowing him to increase his following. In 986, Jiqian submitted to the Khitans and in 989, Jiqian married into Khitan nobility. Jiqian also made symbolic obeisance to the Song, but the Song remained unconvinced of his intentions. Jipeng was sent by the Song to destroy Jiqian, but he was defeated in battle on 6 May 994, and fled back to Xiazhou. Jiqian sent tribute on 9 September as well as his younger brother on 1 October to the Song court.
Emperor Taizong of Song was receptive of these gestures, but Jiqian returned to raiding Song territory the next year. In April 996, Taizong sent troops to suppress Jiqian, who raided Lingzhou in May and again in November 997. For a brief period after 998, Jiqian accepted Song suzerainty, until the fall of 1001 when he began raiding again. Jiqian died on 6 January 1004 from an arrow wound. His son and successor, Li Deming, proved to be more amicable towards the Song than his predecessor.

### Rise of Yuanhao

Li Deming sent tribute missions to both the Liao dynasty and the Song dynasty. At the same time he expanded Tangut territory to the west. In 1028, he sent his son Li Yuanhao to conquer the Ganzhou Uyghur Kingdom. Two years later the Guiyi Circuit surrendered to the Tanguts. Yuanhao invaded the Qinghai region as well but was repelled by the newly risen Tibetan kingdom of Tsongkha. In 1032, Yuanhao annexed the Tibetan confederation of Xiliangfu, and soon after his father died, leaving him ruler of the Tangut state.

## Yuanhao's invasion (1040–1044)

Upon the death of his father, Li Deming, in 1032, Li Yuanhao adopted the Tangut surname of Weiming. He levied all able bodied men between 15 and 60 years of age, providing him with a 150,000 strong army. By 1036, he had annexed both the Ganzhou Uyghur Kingdom and the Guiyi Circuit to his west. In 1038, Yuanhao declared himself emperor of the Great Xia. In response, the Song dynasty cut off border trade and put a bounty on his head.
   Beyond establishing a Chinese-style central government for the militarized kingdom (which included sixteen bureaus), he also designated eighteen military control commissions spread among five military zones: (1) 70,000 soldiers to deal with the Liao, (2) 50,000 assigned to deal with Huan, Qing, Zhenrong, and Yuan prefectures, (3) 50,000 opposite Fuyan circuit and Lin and Fu[1] prefectures, (4) 30,000 to deal with the Xifan and Huige to the west, and (5) 50,000 in the eastern skirtlands of Helan Mountains, 50,000 at Ling, and 70,000 spread between Xing prefecture and Xingqing fu, or superior prefecture. Altogether Yuanhao had as many as 370,000 men under arms. These were mounted forces, which had been stretched thin by hard warfare and probably excessive use of non-warrior horsemen impressed to fill the army. He maintained a six-unit bodyguard of 5,000 and his elite cavalry force, Iron Cavalry (tieqi) of 3,000. It was a fearful concentration of military might overlaying a relatively shallow economic base.
In the winter of 1039–1040, Yuanhao laid siege to Yanzhou (now Yan'an) with over 100,000 troops. The prefect of Yanzhou, Fan Yong, gave contradictory orders to his military deputy, Liu Ping, making him move his forces (9,000) in random directions until they were defeated by Xia forces (50,000) at Sanchuan Pass. Liu Ping was taken captive. Despite the defenders' mediocre performance, Yuanhao was forced to lift the siege and retreat to a ring of forts overlooking Yanzhou, when heavy winter snows set in.
A Song army of 30,000 returned later that winter under the command of Ren Fu. They defeated a small enemy force which encouraged them to advance quickly and confront the main Tangut forces. After engaging with a larger Tangut army at Haoshuichuan, Yuanhao ambushed them with an attack from the rear and annihilated the Song army. Despite such victories, Yuanhao failed to make any headway against Song fortifications, garrisoned by 200,000 troops on rotation from the capital, and remained unable to seize any territory.
In 1041, the Song defeated the Tanguts in several engagements and prevented them from advancing.
In 1042, Yuanhao advanced south and surrounded the fort of Dingchuan. The defending commander Ge Huaimin lost his nerve and decided to run, abandoning his 19,000 troops to be slaughtered. The Song responded by sending two forces, one which threatened the Tangut rear while the other defeated the Tangut vanguagd. Again, Yuanhao failed to gain significant territory. Half his soldiers had died from attrition and after two years, Western Xia could no longer support his military endeavors. Tangut forces began suffering small defeats, being turned back by Song forces at Weizhou and Linzhou.
   By 1043, there were several hundred thousand trained local archer and crossbow militiamen in Shaanxi, and their archery skills were now generally effective. Crucial to defense (or offense) was the use of local non-Chinese allies to screen Song from the monetary costs and social costs of full-scale war. By mid-1042, the accumulated efforts of men like Fan Zhongyan and others to entice the fan to settle in the in-between areas were paying off. The fan generally and the Qiang specifically were siding with the Song much more than with the Xia at this point. By now, also, there were enough forts and walled cities to limit Yuanhao’s maneuverability and to improve mutual support against him.
The Liao dynasty took advantage of the Song's dire predicaments by increasing annual tribute payments by 100,000 units of silk and silver (each). The Song appealed to the Liao for help, and as a result, Emperor Xingzong of Liao invaded Western Xia with a force of 100,000 in 1044. Liao forces enjoyed an initial victory but failed to take the Xia capital and were brutally mauled by Yuanhao's defenders. According to Song spies, there was a succession of carts bearing Liao dead across the desert.
Having exhausted his resources, Yuanhao made peace with the Song, who recognized his rights to Xia lands as king and agreed to pay an annual tribute of 250,000 units of silk, silver, and tea.

## Yizong's raids (1064, 1066–1067)

In 1064, Emperor Yizong of Western Xia raided the Song dynasty. In the fall of 1066, he mounted two more raids and in September, an attack on Qingzhou was launched. The Tangut forces destroyed several fortified settlements. Song forces were surrounded for three days before cavalry reinforcements arrived. Yizong was wounded by a crossbow and forced to retreat. Tangut forces attempted another raid later on but failed, and a night attack by Song forces scattered the Tangut army.
Yizong regrouped at Qingtang and launched another attack on Qingzhou in December but withdrew after threats by Emperor Yingzong of Song to escalate the conflict. The next year, the Song commander Chong E attacked and captured Suizhou. Three years later, the Tanguts invaded Song territory again in retaliation but failed to take any significant territory.

## Shenzong's invasion (1081–1085)

In 1081, the Song dynasty launched a five-pronged attack on the Western Xia. After initial victories, Song forces failed to take the capital of Xia, Xingqing, and remained on the defensive for the next three years. Xia counterattacks also experienced initial success before failing to take Lanzhou multiple times. In 1085, the war ended with the death of Emperor Shenzong of Song.

### Organization

The Song sent five armies against Western Xia.
1. Li Xian - a court eunuch who participated in an earlier campaign against Tsongkha in 1072. He invaded Xia from the southwest with 50,000 troops.
2. Chong E - Assistant Regional Attendant leading an army of 96,000 from the northeast.
3. Wang Zhongzheng - a eunuch who participated in the 1072 campaign against Tsongkha. Led an army of 60,000 from the northwest.
4. Gao Zunyu - maternal uncle of Emperor Shenzong of Song. Participated in the 1073 conquest of Minzhou. Led 87,000 men from Qingzhou.
5. Liu Changzuo - eunuch. Led 50,000 troops as well as 30,000 sent by Dongzhan of Tsongkha from the south.

### War

In the summer of 1081, the five Song armies invaded Western Xia. Chong E defeated a Xia army, killing 8,000.
In October, Li Xian took Lanzhou.
On 15 October, Liu Changzuo's 50,000 strong army met a Xia force of 30,000 led by the Empress Regent Liang's brother. Liu's commanders advised him to take a defensive position, but he refused, and led a contingent of shield warriors with two ranks of crossbowmen and cavalry behind, with himself leading at the front with two shields. The battle lasted for several hours before the Xia forces retreated, suffering 2,700 casualties. Afterwards, Liu captured a large supply of millet at the town of Mingsha, and headed towards Lingzhou.
Liu's vanguard attacked the town's gate before the defenders had a chance to close it, dealing several hundred casualties, and seizing more than 1,000 cattle before retreating. Liu wanted Gao Zunyu to help him take Lingzhou, but Gao refused. Then Liu suggested they take the Xia capital instead, to which Gao also refused, and instead took it as a slight that he could not take Lingzhou. Gao relayed his version of events to the Song court, then had Liu removed from command, merging the two forces.
By November, the Xia had abandoned the middle of the Ordos plateau, losing Xiazhou.
On 20 November, Wang Zhongzheng took Youzhou and slaughtered its inhabitants. At this point Wang became concerned that he would run out of supplies and quarreled with Chong E over provisions. He forbade his troops from cooking their meals because he feared it would alert Xia raiders of their position. His troops became ill from their uncooked food, started to starve, and came under attack by enemy cavalry anyway. Wang was ordered to withdraw while Chong E covered his retreat. Wang lost 20,000 men.
On 8 December, Gao Zunyu decided to attack Lingzhou, only to realize he had forgotten to bring any siege equipment, and there were not enough trees around for their construction. Gao took out his frustration on Liu Changzuo, who he tried to have executed. Liu's troops were on the verge of mutiny before Fan Chuncui, a Circuit judge, convinced Gao to reconcile with Liu. On 21 December, Xia forces breached the dikes along the Yellow River and flooded the camps of the two besieging Song armies, forcing them to retreat. Xia harassment turned the retreat into a rout.
By the end of 1081, only Chong E remained in active command.
In September 1082, the Xia counterattacked with a 300,000 strong army, laying siege to Yongle, a fortress town west of Mizhi. The Xia sent out cavalry to prevent Song relief attempts. The defending commander, Xu Xi, deployed his troops outside the town gates but refused to attack the enemy troops while they forded the river. Then he refused to let his troops in when the Tangut Iron Hawk cavalry attacked, decimating the defending army. With the capture of Yongle, the Song lost 17,300 troops.
In March 1083, Xia forces attacked Lanzhou. The defending commander, Wang Wenyu, led a small contingent out at night and made a surprise attack on the Xia encampment, forcing them to retreat. The Tanguts made two more attempts to take Lanzhou in April and May but failed on both accounts. Their simultaneous attack on Linzhou also failed.
After multiple defeats, the Xia offered peace demands to the Song, which they refused.
In January 1084, Xia forces made a last attempt to take Lanzhou. The siege lasted for 10 days before the Tangut army ran out of supplies and was forced to retreat.

### Peace

The war ended in 1085 with the death of Emperor Shenzong in April. In exchange for 100 Chinese prisoners, the Song returned four of the six captured towns. Hostilities between the Song and Xia would flare up again five years later, and conflict would continue sporadically until the Song lost Kaifeng in the Jingkang incident of 1127.

## Advance and fortify (1097–1099)

Advance and fortify was a Song dynasty military strategy and campaign to seize Western Xia lands in the northwest. The campaign centered on fortifying key locations along river valleys and mountains to erode the Xia position. In 1096, the Song stopped paying tribute to the Xia, and the next year launched a two-pronged "advance and fortify" campaign. From 1097 to 1099, the Song army constructed 40 fortifications across the Ordos plateau. In 1098, the Empress Regent Liang of Xia sent a 100,000 strong army to recapture Pingxia. The Tangut army was completely defeated in their attempt to dislodge the Song from their high ground position, and their generals Weiming Amai and Meiledubu were both captured.

## Song annexation of Tsongkha (1103–1106)

In 1103, the Song dynasty annexed Tsongkha and spent the following year weeding out native resistance. The expansion of Song territory threatened the Western Xia's southern border, resulting in Western Xia incursions in 1104 and 1105. Eventually the Western Xia launched an all out attack on Lanzhou and Qingtang.
After the Advance and fortify campaign of 1097–1099, Western Xia forces were no longer able to defeat Song positions. Failing to take major cities, the Tangut forces went on a rampage, killing tens of thousands of local civilians. The next year Emperor Chongzong of Western Xia made peace with the Song, but was unable to clearly demarcate their borders, leading to another war in 1113.

## Huizong's invasion (1113–1119)

In 1113, the Western Xia started building fortifications in disputed territory with the Song dynasty, and took the Qingtang region. Incensed at this provocation, Emperor Huizong of Song dispatched Tong Guan to evict the Tanguts. In 1115, 150,000 troops under the command of Liu Fa penetrated deep into Xia territory and slaughtered the Tangut garrison at Gugulong. Meanwhile, Wang Hou and Liu Chongwu attacked the newly built Tangut fortress of Zangdihe. The siege ended in failure and the death of half the invasion force.
Wang bribed Tong to keep the number of casualties a secret from the emperor. The next year, Liu Fa and Liu Chongwu took a walled Tangut city called Rendequan. Another 100,000 troops were sent against Zangdihe and succeeded in taking the fortress. The Xia made a successful counterattack in the winter of 1116–1117. Despite piling casualties on the Song side, Tong was adamant about eradicating the Xia once and for all. He gave orders for Liu Fa to lead 200,000 into the heart of the Xia empire, aiming straight at the capital region.
It quickly became apparent that it was a suicide mission. The Song army was met outside the city by an even larger Tangut army led by the Xia prince, Chage. The Tangut army surrounded the Song forces, killing half of them, with the remaining falling back during the night. The Tanguts pursued the Song and defeated them again the next day. Liu was beheaded. A ceasefire was called in 1119 and Emperor Huizong issued an apology to Western Xia.