Sixteen Kingdoms

The Sixteen Kingdoms was a period of Chinese history from 304 to 439 AD during which northern China was divided among several barbarian kingdoms founded by the Wu Hu peoples after the Uprising of the Five Barbarians, while the Jin court was forced to flee south of the Huai River, ending the Western Jin and starting the Eastern Jin. The period was ended by Northern Wei's reunification of northern China in 439 AD.

Background
The War of the Eight Princes of 291-306 AD saw the Jin dynasty of China tear itself apart in a struggle between eight princes of the Sima clan for the regency over the developmentally-disabled Emperor Sima Zhong. During the conflict, several of the feuding princes imported barbarian mercenaries from the non-Chinese nomadic peoples along the country's borders, and these "Wu Hu" ("Five Barbarians" - Xiongnu, Xianbei, Jie, Di, and Qiang) barbarians were treated like slaves by their Chinese overlords. In 304 AD, the Di chief Li Xiong captured Chengdu and proclaimed the creation of the kingdom of Cheng Han, while Liu Yuan proclaimed the kingdom of Han Zhao in the heart of the Jin empire. In 311, Liu Yuan's son Liu Cong sacked the city of Luoyang, killing the Jin crown prince, dozens of high-rankig officials, and 30,000 people. This forced the Jin court to flee south of the River Huai to Jiankang, ending the short-lived Western Jin and initiating the Eastern Jin dynasty. In 313, former Liang Province governor Zhnag Gui founded the Former Liang dynasty, and, in 315, the Xianbei chieftain Tuoba Yilu founded Dai in Inner Mongolia. After Liu Cong's death, Han Zhao was split, as his general Shi Le seceded to form Later Zhao; in 328, he conquered Former Zhao. His kingdom came to control much of northern China, and it had separate laws for the Chinese and non-Chinese. After his death, his sons engaged in a civil war which was ended in 350 when his general Ran Min seized the throne and founded Ran Wei. In 352, he was killed by the Xianbei in Liaodong.

In 337, Murong Huang founded the Former Yan in Liaodong, and it expanded into central China in 356, vying for power with the Former Qin. Fu Jian founded the Former Qin in 351 after declaring independence from the Later Zhao and Jin in Shaanxi, and, after his death in 355, his nephew Fu Jian took control of the leadership with the help of Wang Meng. From 370 to 376, the Former Qin conquered the Former Yan, Dai, and Former Liang to unite northern China, and Fu Jian also conquered Yi Province from the Jin and attempted to conquer all of southern China. However, his defeat at the Battle of Fei River in 383 led to the disintegration of his empire, with Murong Chui seceding to found Later Yan in Hebei in 384, other Murong royals founding the Western Yan in Shanxi, and Yao Chang founding the Later Qin in eastern Gansu. Fu Jian was killed by Yao Chang, but the Former Qing relocated to Qinghai and outlived him. In 385, Qifu Guoren founded the Western Qin, while Lu Guang founded the Later Liang in 386, and Tuoba Gui revived Dai as the Northern Wei. In 388, Zhai Liao founded the Dingling kingdom of Zhai Wei, and seven kingdoms coexisted for nine years. The Later Qin went on to conquer Former Qin in 394, Western Qin in 400, and Later Liang in 403, but, in 416, the Jin general Liu Yu conquered Luoyang and Chang'an and defeated the Later Qin. However, Liu Yu then headed south to seize the Jin throne, overthrowing the Jin in 420 AD and creating the Liu Song dynasty. During Liu Yu's absence, the Xia seized Chang'an. Meanwhile, Later Liang broke up into Northern Liang, Southern Liang, and Western Liang, but the Liang dynasties were conquered by Western Qin in 414 and Northern Wei in 439. The Later Yan conquered Zhai Wei in 392 and the Western Yan in 394, but lost a series of battles to the Northern Wei, which split the Later Yan in two in 397; the Jin conquered Southern Yan in 410, while the Later Yan was overthrown by the Northern Yan in 407. In 431, the Xin conquered Western Qin, but, in 439, Northern Wei conquered Northern Liang. The Northern Wei tuobas were Sinified and changed their surnames to "Yuan", and the Northern Wei's conquest of the north led to the Northern and Southern Dynasties period.