Huang Shaoqing

Huang Shaoqing (, 794–824) was a tribal leader of the Tai-speaking Rau people in Lingnan, who led a long-lasting rebellion against the weakened Tang Empire. By 824 he had occupied eighteen zhou (prefectures) in what is today's southern Guangxi and western Guangdong.

Background
In eighth-century Tang dynasty, the Huang clan was, along with the Nong clan, the most powerful chieftains in the valleys or plains of the Zuo and You rivers in Xiyuan Prefecture (around modern Fusui County, Guangxi). They were the most influential in Ningming, Longzhou, Chongzuo, and Fusui which were known as the Huang Valleys. In 756, faced with heavy taxation and taking advantage of diminished Chinese military presence due to the An Lushan Rebellion ravaging the north, the Rau people rebelled under the leadership of Huang Shaoqing's father Huang Qianyao (黃乾曜). Reportedly over 200,000 people joined the rebellion, which took over an area that consisted of modern Qinzhou, Luocheng, and Donglan. The so-called "Huang Valley Barbarians" (黃垌蠻, Huángdòngmán) or "Xiyuan Barbarians" (西原蠻, Xīyuánmán) killed Han Chinese officials and pillaged government storehouses. The rebellion was quashed after more than 200 days, and Huang Qianyao was killed along with most of his followers. However, sporadic rebellions continued in the following decades, with a particularly large one in 777 which was likewise brutally suppressed.

Revolt
In 794, more than three decades after his father's death, Huang Shaoqing led an army to attack and besiege Yong Prefecture (modern Nanning), which was held by the Military Commissioner (經略使) Sun Gongqi (孫公器). Sun's request for reinforcement was denied by Emperor Dezong who told Sun to appease them. Quickly, Huang Shaoqing's warrior son Huang Changmian (黃昌沔) led an army and conquered 13 prefectures, and only after the fall of Heng, Qin, Xun, and Gui Prefectures, did the Tang court dispatch an army. Led by the Tang Prefecture prefect Yang Min (陽旻), the Tang army began to recover most of its lost territory with "six or seven battles in one day".

In March 807, Huang Shaoqing's vice-commander Huang Chengqing (黃承慶) was captured by the Yong Prefecture force. The following year, Huang Shaoqing agreed to surrender. He was made the prefect of Shun Prefecture. His brother Huang Shaogao (黃少高) was also made a prefect.

It did not take many years before Huang Shaoqing began to rebel again, this time with his kinsmen Huang Shaodu (黃少度) and Huang Changguan (黃昌瓘). They first took and held Bin and Man Prefectures, and then in 816, Qin and Heng Prefectures. That year, the Tang force led by Wei Yue (韋悅), the new Military Commissioner of Yong, took back Bin and Man Prefectures. In January 817, the rebels took Yan Prefecture and massacred its people. The Observational Commissioner (觀察使) of Gui Prefecture, Pei Xingli (裴行立), sent a memorial to Emperor Xianzong promising a quick end to the rebels; but after two years of fighting and inconclusive results, he lied to the court claiming that he had annihilated 20,000 men. Countless Tang soldiers died of malaria and other tropical illnesses.

The Tang court was by then preoccupied with other revolts as well as wars with the Tibetan Empire and Nanzhao, and Pei Xingli was sent to Annan (northern Vietnam) in 820 following multiple uprisings there. In 821, the new Military Commissioner of Rong Prefecture Yan Gongsu (嚴公素) asked the court for another expeditionary force. Han Yu, at that time in exile, submitted a memorial advocating for pacification of the "Huang Valley Barbarians" with offers of amnesty. Han pointed out that the Lingnan population was decimated by the incessant war and disorder, that both Pei Xingli and Yang Min (by then both dead) were hated by the people, and that the court had nothing to gain from putting down the rebellion. Emperor Muzong ignored his advice.

In 822, Huang Shaoqing took advantage of Chinese inaction to attack Long Prefecture and took Zuojiang (左江, west of modern Nanning). After a defeat at the hands of Cui Jie (崔結), the prefect of Yong, Huang took his army south and attacked Qin Prefecture in 823, taking Qianjin (千金) and forcing the Qin prefect Yang Yu (楊嶼) to flee. Later he took Lu Prefecture, killing its prefect Ge Wei (葛維). That year, however, Huang Changguan surrendered to the Tang with 20 followers, and the Tang court pardoned them.

By 824, Huang Shaoqing held 18 prefectures in Lingnan. According to Chinese records, they might have coordinated with Champa forces in Vietnam. The rebellion ended when the Huang chiefs accepted offers to surrender, although they held on to these prefectures until the dahe period (827–835), when a Tang army under Dong Lan (董蘭) overran the territory and massacred all rebels.