# Shilong's Invasion of Sichuan

The Shilong's Invasion of Sichuan was a major military campaign launched by the Nanzhao kingdom against the Tang Dynasty during the late ninth century. The invasion, led by Shilong, targeted Tang-controlled territories in Sichuan, culminating in the Siege of Chengdu. The invasion occurred after the Tang-Nanzhao conflicts in Annan.

## Background

Relations between Tang China and Nanzhao deteriorated in the mid-9th century due to political mismanagement and territorial disputes. Li Shiwang, who was appointed the first commissioner of a new defense command, was more interested in personal enrichment than maintaining stability. He accepted bribes and provoked conflicts with Nanzhao in an attempt to gain military prestige. In 867, a Nanzhao envoy visited him to express gratitude to the Tang court, but Li had the envoy executed, outraging the Nanzhao ruler, Shilong.

## Invasion

Enraged by the execution of his envoy, Shilong launched a massive military campaign in november of 869. He personally led an army of 50,000 soldiers, attacking Xizhou in southern Sichuan before crossing the Dadu River and sacking Lizhou. The Nanzhao soldiers received aid from the Dongman tribe, who had previously been Tang allies and served in Tang operations against Tibet, they became hostile to the empire due to mistreatment by Tang officials.

### Nanzhao offensive

Shilong’s campaign aimed to capture Chengdu, the administrative center of Sichuan, which was poorly defended and facing water shortages due to an influx of refugees. Lu Dan, the military governor, quickly organized the city’s defense, recruiting 3,000 soldiers and overseeing weapon production.
By January 870, Nanzhao troops advanced to Meizhou (modern-day Meishan County), just 75 km from Chengdu. In a last attempt at peace, Lu Dan personally traveled to Meizhou and presented a formal letter to Du Yuanzhong, a Nanzhao official, but received only vague and sarcastic replies. The troops then pushed another 50 km north to Xinjin, prompting Lu’s deputy to seek clarification, but Du detained him without response. Alarmed, Lu urged the court to intervene, leading to the appointment of Zhixiang, head of the Imperial Stud Court, to pacify Nanzhao.
The Tang court’s peace effort came too late. Before Zhixiang could depart, Nanzhao troops captured Shuangliu on the 11th December of 870, advancing to just 25 km from Chengdu. Six days later, Du Yuanzhong presented Lu Dan’s deputy with a letter outlining ceremonial arrangements for the Nanzhao ruler’s arrival, portraying him as the emperor and Lu as his subject. This audacious demand, along with reports that Nanzhao troops were preparing a temporary residence for their leader in the southern suburb of Chengdu, alarmed Lu. On the 20th december, Nanzhao forces reached Chengdu. After ten days of preparation, they launched a full-scale assault on the city.

### Siege of Chengdu

Nanzhao forces assaulted in four directions with scaling ladders and battering rams, and Tang defenders responded with fire attacks and hand-to-hand combat. Lu Dan's 3,000 Elite soldiers staunchly fought, killing 2,000 enemies and destroying 3,000 pieces of military equipment.
When frontal assaults failed, Nanzhao soldiers devised a "bamboo tank," shielding themselves as they burrowed. But the Tang soldiers responded by hurling jars of feces and melted metal, rendering the cage ineffective. Nanzhao then launched nocturnal attacks, but the Tang lit a thousand torches to expose them. After a month of bitter combat, Zhixiang proposed peace negotiations with Shilong, who accepted. However, a misunderstanding led to the resumption of fighting. Tang forces mistook movement outside the city for reinforcements, rushed out, and fought Nanzhao troops. This disrupted the negotiations, and Shilong thought that the Tang were not serious, and he restarted the attacks.
The tide of events changed when Yan Qingfu, the Jiannan East Circuit military governor, dispatched a relief expedition. His army defeated Shilong's forces at Xindu, killing 2,000 troops. Shortly afterwards, another Tang army dealt 5,000 casualties, and Nanzhao troops retreated to the mountains. As reinforcements threatened Chengdu, Shilong launched increasingly desperate attacks but could not break through.
On the eighteenth, with Tang troops converging, Shilong decided to end the campaign, burning heavy equipment before departing overnight. Before dawn, Yan Qingfu managed to take Chengdu, initiating efforts to fortify the city with moats, stockades, and turrets in hopes of preventing future invasions.

## Aftermath

Despite his defeat, Shilong still endeavored to seize Chengdu. Although the city's defenses deterred an open attack, Nanzhao raids persisted, with Nanzhao invading Guangxi and southern Sichuan in 873.
Shilong besieged Xizhou that winter of 874 and went on to the Dadu River, where they confused the Tang forces by pretending to be defeated soldiers. They built a floating bridge for the main force after crossing and thus took Lizhou and Yazhou. Taking advantage of their strength, they took Qiongzhou and positioning themselves only 70 kilometers southwest of Chengdu. Nanzhao troops defeated the Tang forces at Qionglai Pass and took the suburbs of Chengdu. The city gates were not opened for three days, while the invaders ravaged the suburbs and then retreated.