# Upheaval of the Five Barbarians

The Upheaval of the Five Barbarians also translated as the Uprising, Rebellion or the Revolt of the Five Barbarians (simplified Chinese: 五胡乱华; traditional Chinese: 五胡亂華; lit. 'Five foreign tribes disrupting China') is a Chinese expression used to refer to a chaotic period of warfare from 304 to 316 during the fall of the Western Jin dynasty. Overlapping with the War of the Eight Princes, these conflicts which involved non-Han groups living within China eventually drove the Jin imperial court out of the northern and southwestern China.
The "Five Barbarians" were the Xiongnu, Jie, Qiang, Di and Xianbei, many of whom had resettled within China during the preceding centuries. Despite the period's name, many Han Chinese and other tribal people like the Wuhuan were also involved, wavering their support between Jin and the separatist regimes. Years of poor administration and civil wars between the ruling princes left the empire open to its disaffected and opportunistic subjects. Ethnic tensions in the Guanzhong region between the Han and the tribes, primarily the Qiang and Di, led to major revolts which resulted in an exodus of refugees into southwestern China. Efforts to force them back to Guanzhong were met with resistance and culminated in the rebellion of the Ba-Di refugee, Li Te in 301.
In the north, the Five Divisions of Bing province, descendants of the Southern Xiongnu, took advantage of the Jin prince's infighting to declare independence and establish the Han-Zhao in 304, acclaiming the noble, Liu Yuan as their leader. As anti-Jin revolts spread to Hebei and Shandong, a former Jie slave, Shi Le, rose to prominence, and after joining Liu Yuan, he would effectively control the eastern part of his empire. The Xianbei Duan tribe in Liaoxi and Tuoba tribe in Dai were initially important allies of Jin in helping them fight against Han, but later pulled out from the conflict to consolidate control over their territories.
Li Te's son Li Xiong captured Chengdu and established Cheng-Han in 304. In 311, Han captured Emperor Huai of Jin and the ancient capital, Luoyang in an event known as the Disaster of Yongjia. In 316, Jin's hope of restoring imperial authority in the north were crushed when Han defeated and captured Emperor Min in Chang'an. The establishments of Cheng-Han and Han-Zhao in 304 were seen as the start of the Sixteen Kingdoms period, and the defeat of Emperor Min led to the formation of the Eastern Jin dynasty by Emperor Yuan in Jiankang in 318. For the next 130 years or so, China would be divided between the Sixteen Kingdoms and the Eastern Jin before the eventual dissolution of Jin by the Liu Song dynasty and the unification of the north by the Northern Wei dynasty.

## Background
### Demobilization and War of the Eight Princes

When the Jin dynasty was established in 266, Emperor Wu of Jin sought to learn from the mistakes of his predecessor, the Cao Wei, by empowering the princes. Unlike the Wei, the princes were allowed to become military governors and were given personal armies in their fiefdoms. After unifying China in 280, Emperor Wu issued for the demobilization of every province and commandery in the empire and reduced the military authority of the provincial inspector into a civilian role. Only 100 military officials were stationed in large commanderies, while smaller commanderies only had 50.
The emperor had hope that concentrating military power in the hands of the princes would deter the gentry clans from assuming power, but these decisions led to the War of the Eight Princes after his death in 290. His successor, Emperor Hui of Jin, was developmentally disabled, and the princes pitted their armies against each other for control over the empire in light of the new emperor's lack of agency.
While the Jin military weakened itself under the princes, many counties and commaderies were left defenceless to rebellions. In the finals years of the Western Jin, tribal subjects collectively known as the Five Barbarians emerged dominant over northern and western China. These Five Barbarians were the Xiongnu, Jie, Qiang, Di and Xianbei.

### The Five Divisions and hu of Bing province

The migration of the nomadic people into the Chinese interior had been ongoing since the early Han dynasty. In 50 CE, a few years after the Xiongnu empire was divided into two, the Southern Xiongnu became a vassal state for the Han on the northern frontier within the Great Wall. The chanyu's court was moved to Xihe Commandery in Bing province and the Southern Xiongnu acted as Han auxiliaries in defending the border from nomadic forces such as the Northern Xiongnu and Xianbei. Relations were tense between the Southern Xiongnu and Han, due to the poor living conditions of the northern frontier and the Chinese court interfering in their politics. The tribes of the Southern Xiongnu often rebelled, eventually sending their chanyu into exile and dissolving his government in 189, just as the Han was experiencing their own collapse.
In 216, the warlord, Cao Cao, detained the exiled chanyu, Huchuquan in at Ye and reorganized what remained of the Southern Xiongnu into the Five Divisions in central Shanxi. Though the Xiongnu gradually ceased as a coherent ethnic group, Bing province remained home to various tribes who were vaguely referred to as hu and other terms for the non-Chinese. The Five Divisions became dominated by the Chuge branch, and one of their leaders, Liu Bao briefly unified them during the Jiaping era (249–254). The Wei-Jin courts had soon intervened, dividing them back into five and forcing their nobles to send their children as hostages. As a result, the Five Divisions nobility underwent significant degree of sinicization and were even allowed to hold Jin offices, but resentment against the ruling dynasty persisted. As the noble, Liu Xuan, states in the Book of Jin:
   “In the past, our ancestors and those of the Han acted like brothers through joy and sorrow. However, since the fall of Han and the rise of Wei and Jin, our titles of chanyus hold no value, and we have not gained a foot of land since. Although we have been bestowed with many noble ranks, our households are all equally low."
The hu tribes excluded from the Five Divisions intermingled with those from other ethnic group, a notable example being the Tiefu tribe, who descended from the Xiongnu and mixed with the Xianbei. The Jie were also among the miscellaneous hu people in Bing. Their exact origins is still debated by scholars today, although one of the Jie chieftains, Shi Le, was a descendant of a Southern Xiongnu tribe, the Qiangqu (羌渠). When a great famine broke out in 303, many of the Jie and hu became displaced. The Chinese provincial inspector, looking to fund his own military, had these tribesmen captured and sold them into slavery, causing them to be scattered around Hebei and Shandong.

### Ethnic tensions in Guanzhong

The term "Qiang" broadly referred to groups of pastoral nomads in the western regions of modern day Gansu and Qinghai. Since the Western Han period, many of the Qiang submitted to the Chinese court and were allowed to settle in the Guanzhong region and the watersheds of the Wei and Jing rivers. There, they practiced agriculture and lived together with Chinese settlers, but faced with oppression from the local administrators, they often instigated large-scale rebellions which adversely affected the Han military and economy. Living close to the Qiang were the Di tribes, who became Han tributaries as the Han expanded westwards and annexed their land.
The fall of Han and the Three Kingdoms period further encouraged the immigration of nomadic people to repopulate devastated areas and provide military power and labour. The Guanzhong region in particular became a contested region between warlords and later between the states of Cao Wei and Shu Han. In 219, Cao Cao relocated around 50,000 Di from Wudu to Tianshui and Fufeng commanderies. The Qiang and Di people were numerous in northwestern China, and they often fought for Wei or Shu depending on their circumstances. Other tribal people who resided in the northwest included the Lushuihu and Xiuchu, along with newly-migrated Xianbei tribes such as the Tufa (禿髮) and Qifu (乞伏). The tribes made up around half of the population in Guanzhong.
While Wei kept the situation mostly under control, the northwest descended into chaos under the Western Jin as their governors failed to keep the support of the tribes. In 270, the Xianbei chieftain, Tufa Shujineng, led a multi-ethnic rebellion against Jin in Liang and Qin provinces that lasted until 279, with the rebels briefly taking control over Liang. From 296 to 299, the various tribes rebelled again, this time within Guanzhong and acclaiming the Di chieftain, Qi Wannian as their emperor. Qi Wannian's rebellion was accompanied by famines and plagues so severe that it devastated the Guanzhong and prompted tens of thousands of refugees to move into Hanzhong and Sichuan in search of food.
The rebellious tribes of Guanzhong and Bing province raised concern among a few officials within the Jin court. After the unification in 280, the minister Guo Qin (郭欽), advised Emperor Wu to focus on moving the tribal peoples out of the borders. Following Qi Wannian's defeat in 299, another minister, Jiang Tong, submitted an essay titled Xi Rong Lun (徙戎論; Discussion on Relocating the Rong Tribe) to the court, also calling for the tribes' repatriation. However, both proposals were rejected.

### Xianbei migration and alliances with Jin

During the 2nd century, the Xianbei people supplanted the Xiongnu on the northern steppe and, unified under the confederation of Tanshihuai, launched numerous raids on the Han's borders. However, after Tanshihuai's death in 181, the confederation went into an immediate decline due to a succession crisis. Many of the Xianbei tribes seceded and decided to migrate southward with the intention of settling down near or within the Chinese interior.
In the northeast, where the Wuhuan people once dominated before their defeat at the Battle of White Wolf Mountain, the Xianbei Murong, Duan and Yuwen tribes came to fill in the power vacuum. The Murong was the first of the three to associate themselves with the Central Plains dynasties by aiding the Cao Wei in their campaign against Gongsun Yuan. They remained affiliated well after the founding of Jin, and despite a war between both sides from 281 to 289, the Murong resubmitted to Jin and their chieftain, Murong Hui, was appointed Commander of the Xianbei. Meanwhile, in 258, another Xianbei tribe, the Tuoba, occupied the abandoned city of Shengle north of Shanxi, also becoming a vassal of Wei and Jin.
At the turn of the 4th century, the Chief Controller of You province, Wang Jun, sought to consolidate his control over his province amidst the War of the Eight Princes. He allied himself with the neighbouring Duan and a chief of the Yuwen, who provided him with auxiliaries who fought in the campaigns against Sima Ying and Sima Yong. The Xianbei were a deciding factor in Sima Yue's victory in the civil war, but they also partook in the sacking of Ye in 304 and Chang'an in 306, killing thousands of the cities' inhabitants. Their effectiveness encouraged Jin to continue employing them in containing the growing threat of Han-Zhao, with the Tuoba joining on the side of Jin as well.

### Climate Change

Modern historians and meteorologists believe that climate change was an important factor in the migration of nomadic peoples into the Chinese interior, as the weather became too cold and dry in the north for agriculture. Chu Coching stated that there was a cold period from the Three Kingdoms to the Northern and Southern dynasties, with relevant historical records reporting cases of extreme weather phenomena, such as the freezings of the Huai River in 226 and the Bohai Sea in 336. Research conducted in the Mu Us Desert also found that desertification took place around the steppe between the Han and Tang dynasties, making it difficult for cities to survive.
There was a severe decline in population; the Han census in 157 was 56.5 million people and 10.7 million household, but Jin census in 280 was only 16 million people and 2.5 million households. The cold and dry weathers prompted Chinese farmers to move to the warmer southlands and steppe peoples to move into northern China for fertile land. During the Taikang era (280–289), the Jin accepted a series of submissions from people claiming to be "Xiongnu" living outside the border, with the largest group coming in 286, purportedly at 100,000. Natural disasters and famines became common occurrences and were aggravated by the War of the Eight Princes.

## Rise of Cheng-Han
### Refugees in Ba-Shu

The people displaced by Qi Wannian's rebellion were from six commanderies in Guanzhong and composed of both Han Chinese and tribal peoples. They initially moved southwards to Hanzhong, where one Di chieftain, Yang Maosou, brought his followers to Chouchi and declared semi-autonomy from Jin in 296. Later, the court allowed the refugees to go further south into the Ba-Shu region. They were scattered throughout Yi and Liáng provinces, where they became hired labourers for the local populace.
Among the refugees was one of their leaders, Li Te. He and his family were Ba-Di people, an ethnic group whose ancestors were Cong people from Ba who moved north and mingled with the Di. In 300, Li Te and his brothers joined the Inspector of Yi in his rebellion against Jin, but later betrayed and ousted him from the provincial capital, Chengdu, sacking it in the process. Li Te soon submitted back to Jin due to the arrival of the army led by the new inspector, Luo Shang but retained a significant amount of influence in the region as an acting representative for the refugee families.

### Li Te's Rebellion

In 301, the court in Luoyang ordered the refugees to return to Guanzhong, but they were reluctant to comply as they believed that it was still unstable and they did not have enough supplies to guarantee a safe journey. Li Te extended their stay by negotiating with Luo Shang, but the latter soon became frustrated with the delay and tried to force a move. As conflict appeared inevitable, many of the refugees flocked to Li Te to defend themselves. In winter 301, Luo Shang sent his troops to attack them, beginning a three-year-long rebellion led by Li Te and his family.
Li Te had much success against the Jin forces as he defeated them in several battles. In 303, his forces reached the vicinity of Chengdu where he declared a new reign era, hinting at a new regime. However, before he could realize it, he was abruptly killed in an ambush. Leadership fell to his brother, Li Liu, and after he died at the end of the year, it fell to Li Te's son, Li Xiong. In 304, Li Xiong drove Luo Shang out of Chengdu and established the state of Cheng (renamed Han in 338, thus the name Cheng-Han).

### Early years of Cheng-Han

Li Xiong initially declared himself King before promoting himself to Emperor in 306. Between Cheng's inception and the fall of Western Jin, Cheng took a slow approach to expansion, only acting when there was a neighbouring refugee revolt. Their most significant gain came in 314, when rebels in Hanzhong surrendered the region to Cheng. Its existence was threatened in 309 when Luo Shang launched an offensive to support rebelling Cheng administrators. Despite losing key commanderies early on, Cheng was eventually successful at recovering them and repelling Jin by 311.
The wars with Li Te and Cheng created more refugees, this time from Yi province moving east into Jing province. Jin forces in the south were unable to concentrate their resources on the southwest due to rebellions in Hubei and Hunan. Between 303 and 304, a Man official, Zhang Chang led a revolt that spread across Jing, Jiang, Xu, Yang and Yu provinces consisting of refugees and people evading the draft to fight against Li Te's rebellion. From 311 to 315, Du Tao, a Han Chinese, led a refugee uprising against Jin in Jing and Xiang (湘州; in modern Hunan) provinces. Unlike Li Te's rebellion, the revolts in Hubei and Hunan were put down by Jin in the end.

## Rise of Han-Zhao
### Founding of Han-Zhao

In 304, the Five Divisions in Bing conspired to take advantage of the Jin princes' infighting to break away from the empire. Serving under the prince, Sima Ying, was the general, Liu Yuan, who was the son of Liu Bao and had served a series of offices under Jin overseeing the Five Divisions, becoming popular among the tribes and Han Chinese in Bing and You provinces. His granduncle, Liu Xuan, convinced the Five Divisions to elect him as their leader, so they sent an envoy to Ye, where Liu Yuan was stationed, to inform him of the plot.
At the time, Sima Ying was on the verge of defeat as Wang Jun and his army of Xianbei and Wuhuan cavalry marched onto Ye. After agreeing to join the plot, Liu Yuan received Sima Ying's permission to return to Bing so that he could gather the Five Divisions to help repel Wang Jun. Once Liu Yuan reached Lishi, however, he instead acclaimed himself as the new Grand Chanyu and rallied around 50,000 soldiers.
Later in 304, Liu Yuan established the state of Han (renamed Zhao in 319, thus the name Han-Zhao). Official history states that Liu Yuan was a direct descendant of the Southern Xiongnu chanyu as the grandson of Yufuluo, although some modern Chinese historians have challenged this claim. Regardless, Liu Yuan sought legitimacy by depicting his state as a revival of the Han dynasty, citing that his ancestors like Modu Chanyu were married to Han princesses through Heqin. He initially took the imperial title of King, only becoming Emperor in 308 to imitate the ascension of Emperor Gaozu of Han. To bolster his forces, he was willing to accept the Han Chinese and tribes from other ethnic groups like the Xianbei and Di to serve under him.

### Rebellions in Hebei, Henan and Shandong

In the next few years, more rebellions began to break out in northeastern China. In 305, Gongshi Fan rebelled in Hebei and in 306 Liu Bogen (劉柏根), rebelled in Shandong. The two rebellions were swiftly dealt with by late-306, but Jin was unable to completely wipe out their forces, allowing their remnants to develop into more serious threats. Many of these rebel leaders were Han Chinese, but the most influential of them would prove to be Shi Le, a Jie chieftain who was previously sold into slavery during the great famine in Bing province of 303.
After Gongshi Fan's defeat, his subordinates, Ji Sang and Shi Le, fled to the pastures of Shandong where they gathered followers, many of who were horse shepherds, and raided the surrounding counties. Claiming to avenge the popular Prince of Chengdu, Sima Ying who had recently died, their forces grew to such a size that in 307, they sacked the city of Ye and left it to burn for ten days. Around 10,000 people were killed including the city's commander. However, after they left to invade Yan province, they suffered a string of defeats. Ji Sang was killed, but Shi Le survived and made his way to Han.
Liu Bogen's subordinate, Wang Mi, also survived his superior's defeat and fled to Shandong, where he formed a bandit group. His forces grew immensely, and in 307, he invaded Qing and Xu provinces, ravaging the commanderies and killing many of the local officials. Wang Mi then attached himself to Han, and in 308, his rebellion spilled over to Yan and Yu provinces while his forces swelled to the tens of thousands. He was even able to enter Xuchang and empty the city's arsenal before laying siege on Luoyang. However, the siege ended in failure as he was unable to break through the capital's defense. With his momentum coming to a halt, Wang Mi brought his forces over to Han.
Under Liu Yuan, Shi Le and Wang Mi were elevated to powerful commanders. Wang Mi was a friend of Liu Yuan and was thus immediately entrusted with important military affairs. Meanwhile, Shi Le, around the time of joining Han, helped convinced several hu tribes around Shanxi into joining the state. For his deeds, he was given full command over the armies east of the Taihang Mountains.

### Disaster of Yongjia

The War of the Eight Princes had concluded by the start of 307, but Jin’s new paramount authority, Sima Yue, inherited a difficult situation. The civil wars had exhausted the Jin military in the north and left major cities, including Luoyang, vulnerable. Despite quelling them, Ji Sang and Wang Mi’s rebellions saw rebels occupying Ye and Xuchang. Internally, Yue was also desperate to secure his paramountcy and avoid the same fate as his predecessors, especially with the ascension of the abled Emperor Huai of Jin in early 307. Yue was wary of the new emperor and left Luoyang with the imperial army shortly after his enthronement. During his return in 309, he had Emperor Huai’s advisors killed and replaced the veteran palace guards with soldiers from his own fief. While consolidating his power, these acts deepened the enmity between Yue and the emperor.
In addition to constant warfare, the famine in northern China also worsened due to natural disasters. In 309, a great drought was reported to have sunk the Yellow, Yangzi and Han rivers to the point that one could wade their way across them. The following year, locust swarms affected six northern provinces, including the capital region. The war and famines resulted in refugee groups like the Qihuo (乞活; "Begging Life") emerging, either to flee south or to defend themselves against the chaos. Some of them huddled in fortresses, with their leaders becoming known as wuzhus (塢主; "fortress masters"). The Book of Jin described the famine as follows:
   By the Yongjia period [307–12] trouble and disturbances were widespread. From Yongzhou eastward many suffered from hunger and poverty. People were sold [as slaves]. Vagrants became countless…there was a bad plague of locusts…Virulent disease accompanied the famine. The people were murdered by bandits. The rivers were filled with floating corpses; bleached bones covered the fields…There was much cannibalism. Famine and pestilence came hand in hand.
In 308, the Han conquered Pingyang Commandery, where they shifted their capital and brought themselves closer to Luoyang. While Shi Le and Wang Mi's forces raided the North China Plain, Liu Yuan's son Liu Cong attacked Luoyang twice in 309, without success. The attacks, famine and animosity with the emperor convinced Sima Yue to bring the imperial army out on the field. In 310, he left the capital with the 40,000 men to Xiang County (項縣; in present-day Shenqiu County, Henan) to campaign against Shi Le, leaving behind Emperor Huai despite his opposition. Yue had also fallen out with his own generals, especially Gou Xi, and for this reason, he was reluctant to go north and campaign in Han's domain, fearing that Gou Xi and the others might cut off his rear.
After Liu Yuan died in late 310, his successor, Liu He was overthrown by Liu Cong just a week into his reign. After taking the throne, Liu Cong made another attempt to capture Luoyang. Tension between Sima Yue and Emperor Huai reached its breaking point in 311 when Yue discovered the emperor's conspiracy with Gou Xi to depose him. Yue wanted to attack Gou Xi, but was so overwhelmed with stress that he grew ill and soon died. Following Yue's death, his followers were unsure on how to proceed, so the imperial army, led by Wang Yan, decided to hold Yue's funeral at his fief in Donghai first. However, Shi Le pursued and defeated the funeral procession at the Battle of Ningping, where reportedly more than 100,000 soldiers perished including Wang Yan himself.
The defeat of Wang Yan's forces finally exhausted the military capacity of the Jin, leaving Luoyang open to capture. Upon entering the city in July 311, the Han armies led by Wang Mi, Huyan Yan and Liu Yao engaged in a massacre, razing the city and causing more than 30,000 deaths. This event in Chinese history was known as the Disaster of Yongjia, after the era name of Emperor Huai; the emperor himself was captured, while his crown prince and clansmen who were in the capital at the time were killed. Gou Xi was also defeated and captured by Shi Le at Mengcheng County. Just a few months later, Han forces led by Liu Can captured Chang'an, briefly placing the two ancient capitals under Han control.

## Final defeat of the Western Jin
### Restoration in Chang'an

Despite the loss of the emperor and the capital, the Western Jin would survive for another five more years. In 312, a group of Jin generals managed to recapture Chang’an, where they then acclaimed the 12-year-old Emperor Min of Jin (Emperor Huai's nephew) as the new emperor in 313. Elsewhere, Jin governors also refused to surrender and continued to resist Han. Although Luoyang was at hand, the Han court opted to remain in Pingyang, as the former Jin capital was still surrounded by enemies and had been razed by Liu Yao.
Being only a minor upon his ascension, Emperor Min was mostly a figurehead for his closest generals, only retaining his ability to legitimately hand out appointments throughout the empire. Not long after recapturing Chang'an, these generals fought each other in a brief but bloody power struggle, with Emperor Min eventually falling into the hands of the pair, Suo Chen and Qu Yun. Even then, the two men's authority was restricted to Chang'an and its surroundings, as they did not have the capacity to exert their rule over the rest of Guanzhong, let alone outside of it. The Jin administrators in Guanzhong were unenthused about supporting the new government and often hesitant to send out their forces to aid it. Emperor Min had to rely on the Inspector of Qin province, Sima Bao and the Inspector of Liang province, Zhang Gui (later his son, Zhang Shi) in the west to provide him with reinforcements.
Along with the administrators in Guanzhong, the Qiang, Di and other tribes were also left to their own devices and asserted their power over the region. While some of the tribes welcomed and sided with the Han regime, there were also those who remained loyal to Jin and helped in the restoration. Others remained neutral during the conflict and formed independent domains, only submitting to Han-Zhao after the fall of the Western Jin. The two most notable examples were the Di, Pu Hong, in Lüeyang commandery and the Qiang, Yao Yizhong, in Fufeng commandery.

### Shi Le's conquest

Since joining Han, Shi Le had full control over his own forces and was active in the northwest, where he attracted the hu people in Hebei and Shandong to his cause. His influence was amplified when, after the Disaster of Yongjia, he assassinated Wang Mi at a banquet and absorbed his army. Liu Cong, fearing that Shi Le would rebel, was powerless to punish him and could only appease him to prevent escalation. Shi Le virtually controlled the Han's eastern domain, with his only challenge coming from Cao Ni in Shandong, who even then had to constantly waiver his allegiance. Early in the upheaval, Shi Le’s army operated as a roving band that attacked and pillaged counties but never capturing them. After a disastrous campaign to attack Jiankang in 312, he took the advice of his advisor, Zhang Bin, to establish and cultivate a base in Xiangguo (襄國, in modern Xingtai, Hebei).
The strongest Jin forces in the northeast were the Inspector of You province, Wang Jun and the Inspector of Bing province, Liu Kun, who were backed by the Xianbei Duan and Tuoba tribes respectively. The Duan continued their alliance with Wang Jun after the War of the Eight Princes and played a crucial role in hindering Shi Le's forces. In addition to the Duan, Wang Jun was also supported by the Wuhuan tribes. The Tuoba first assisted Jin against Han forces in 305, but their involvement intensified during the reign of Tuoba Yilu, who made a formal alliance with Liu Kun in 309. For their efforts, the Duan received Liaoxi while the Tuoba received Dai Commandery as their fiefs.
However, both Wang Jun and Liu Kun were heavily reliant on their tribal allies. The two governors had trouble maintaining population in their territories, as initially, they would attract thousands of refugees, but just as many people would leave them to join the safer and better-managed Xianbei fiefdoms. Thus, their populations declined as the war and famines began to take their tolls. When Liu Kun lost his capital to Han in 312, he was forced to flee to the Tuoba, who helped him reclaim the city. Wang Jun and Liu Kun were also distrustful of and refused to collaborate with each other, stemming from Liu Kun's role in persuading the court to award Dai Commandery, a commandery under Wang Jun, to the Tuoba.
In the end, Shi Le was able to exploit Wang Jun and Liu Kun's weaknesses. During a siege on Xiangguo in 312, Shi Le's forces captured a cousin of the Duan chieftain, opening up negotiations between the two sides. Convinced by Shi Le's sincerity, the Duan agreed to severe their ties with Wang Jun, and as Shi Le capitalized on his victory, the Wuhuan also defected to Han. Deprived of his tribal forces, Shi Le captured Wang Jun at the latter's own capital in Jicheng and executed him in 314. In 316, the Tuoba fell into civil war and left Liu Kun without his key ally to fend off Shi Le. Soon afterwards, Liu Kun suffered a decisive defeat to Shi Le, prompting his subordinates to surrender the province to Han.

### Fall of Chang'an

Liu Yao, having lost Chang'an under his watch, was entrusted by Liu Cong to recapture the city. Shortly after Emperor Min ascended the throne in 313, Liu Yao and the other Han generals immediately began efforts to defeat him. Emperor Min's generals were able to inflict the Han forces some defeats but ultimately failed at halting their advances. In autumn 316, Liu Yao finally laid siege on Chang'an. Suo Chen and Qu Yun mounted a last-ditch defence, but by winter, the food supply within the city had exhausted. Most of the city's inhabitants had either fled or perished, and with no signs of reinforcements, Emperor Min surrendered to Han on 11 December 316.

## Aftermath
### Sixteen Kingdoms

While Han enjoyed military success, it was also internally unstable. Due to conflict between Liu Cong and his own ministers, the court suffered from bloody infighting with Liu Cong executing many key officials. After he died in 318, his successor Liu Can and their family were exterminated in a coup in by the powerful consort kin, Jin Zhun. Liu Yao and Shi Le joined forces to defeat Jin Zhun, during which Liu Yao was acclaimed as the new emperor. However, after the rebellion, Shi Le finally declared his independence in 319. Liu Yao relocated the capital to Chang'an and renamed the state to (Former) Zhao, followed by Shi Le founding his own state of (Later) Zhao in Xiangguo. This led to a decade-long confrontation that would end in Han-Zhao's demise and the Later Zhao asserting dominance over most of northern China.
The founding of Han-Zhao and Cheng-Han in 304 is often seen as the beginning of the Sixteen Kingdoms period, and the Later Zhao is also considered as one of the sixteen. As Jin lost ground in the north, the Zhang clan in Liang province and the Murong tribe in Liaodong became effectively independent. Their natural defenses and stable governance made them popular areas for refugees, with the Murong notably employing Han Chinese officials into their administration. The Zhang clan's regime is known as the Former Liang, but for most of its existence, they remained as a vassal of Jin. The Murong founded the Former Yan in 338 though would only declare independence from Jin in 352. As the period progressed, more of the Sixteen Kingdoms would emerge.
Other regimes that sprang up from the upheaval but are not considered as part of the Sixteen Kingdoms were the Di-led Chouchi, the Tuoba-led Dai, the Duan and Yuwen states in Liaoxi, and the Tiefu tribe around the Ordos Plateau.

### Eastern Jin dynasty

Liu Cong had Emperor Huai and Emperor Min killed in 313 and 318 respectively. Both emperors suffered similar fates; they were forced to serve as Liu Cong's servants before being executed. Following Emperor Min's death, Sima Bao made a claim to the throne but died before he could realize it, and his forces were subsequently crushed by Liu Yao in 320. In Hebei, there were still pockets of Jin resistance after Wang Jun and Liu Kun's defeats, the strongest being a branch of the Duan that remained loyal to Jin in Jicheng, but by 321, they were all defeated by the Later Zhao. The Later Zhao also conquered Shandong from Cao Ni in 323.
After the Eastern Wu fell in 280, the gentry clans in Jiangnan went into a decline as imperial authority was shifted back to Luoyang. In 305, they attempted to breakaway by backing the rebel general, Chen Min in his takeover of the region. However, dissatisfied by his rule, they later revolted and killed him, quickly resubmitting to Jin in 307. Following Chen Min's defeat, Sima Yue stationed the Prince of Langya, Sima Rui at Jianye (later Jiankang) to govern the region, and with the help of the cousins, Wang Dun and Wang Dao, Rui was able to win the support of the gentry clans.
As the upheaval unfolded, Jiankang emerged as a centre of authority in southern China. Safe from the chaos in the north, many northern officials flocked to serve under Sima Rui, and after Emperor Min's capture, the gentry clans backed him to take the throne. The Jiankang regime was uninterested in helping Emperor Min reclaim northern China, or were genuinely too threatened by the refugee uprisings in Hubei and Hunan to avert their resources. When the general, Zu Ti volunteered to lead a northern expedition, Rui permitted it but provided him with very meager supplies and no weapons, armors or soldiers. With Emperor Min's death in 318, Sima Rui declared himself emperor and found the Eastern Jin dynasty, formally shifting the Jin court to the south.

## Historical impact

The collapse of the Western Jin had long-lasting effects. Just 24 years after the Western Jin dynasty ended the Three Kingdoms period in 280, China was once again in a state of division. The Sixteen Kingdoms ushered northern China into an age of constant warfare as well as political and economic collapse. The period ended in 439 with the unification of the north by the Northern Wei, completing the transition into the Northern and Southern dynasties period, but the full unification of China would only be achieved by the Sui dynasty in 589.
In 1907, the archaeologist, Aurel Stein discovered five letters written in Sogdian (an ancient Eastern Iranian language) sometime after the disaster known as the "Ancient Letters" in an abandoned watchtower near Dunhuang. One letter in the collection, written by the Sogdian, Nanai-vandak, addressed to his people back home in Samarkand informing them about the upheaval. He claimed that every single one of the diaspora Sogdians and Indians in Luoyang had died of starvation, and the emperor had fled the capital as the city and palaces were burnt. He added that Yecheng and Luoyang were no more while alluding to Jin’s efforts to recapture Chang’an as the conflict ended in disaster for the Sogdian diaspora in China.
While the era was one of military catastrophe, it was also one of deep cultural interaction. The tribes introduced new methods of government, while also encouraging introduced faiths such as Buddhism. Meanwhile, the southward exodus of the cultured Jin elite, who then spread across the southern provinces including modern-day Fujian and Guangdong, further integrated the areas south of the Yangtze River into the Chinese cultural sphere.

### Han Chinese migrations

The chaos and devastation of the north led to a mass migration of Han Chinese to the areas south of the Huai River, where conditions were relatively stable. The southward migration of the Jin nobility is referred to in Chinese as yī guān nán dù (衣冠南渡, lit. "garments and headdresses moving south"). Many of those who fled south were of prominent families, who had the means to escape; among these prominent northern families were the Xie clan and the Wang clan, whose prominent members included Xie An and Wang Dao. Wang Dao, in particular, was instrumental in supporting Sima Rui to proclaim the Eastern Jin dynasty at Jiankang and serving as his chancellor. The Eastern Jin, dependent on established southern nobility as well as exiled northern nobility for its survival, became a relatively weak dynasty dominated by regional nobles who served as governors; nonetheless it would survive for another century as a southern regime.
The "Eight Great Surnames" were eight noble families who migrated from northern China to Fujian in southern China due to the uprising of the five barbarians when the Eastern Jin was founded, the Hu, He, Qiu, Dan, Zheng, Huang, Chen and Lin surnames.
The different waves of migration such as the fourth century and Tang dynasty northern Han Chinese migrants to the south are claimed as the origin of various Chen families in Fuzhou, Fujian. Mass migrations led to southern China's population growth, economic, agricultural and cultural development as it stayed peaceful unlike the north. Yellow registers were used to record the original southern Han Chinese population before the migration and white registers were used to record the massive influx of commoner and aristocratic northern Han Chinese migrants by the Eastern Jin dynasty government.
After the establishment of the Northern Wei in northern China and a return to stability, a small reverse migration of southern defectors to northern China took place. In Luoyang a Wu quarter was set up for southerners moving north. Han Chinese male nobles and royals of the southern dynasties who fled north to defect married over half of Northern Wei Xianbei Tuoba princesses. Southern Chinese from the southern capital of Jiankang (Nanjing) were deported to the northern capital of Chang'an by the Sui dynasty after reuniting China.
Han Chinese refugees from the five barbarian uprising also migrated into the Korean peninsula and into the Murong Former Yan state. Eastern Jin maintained nominal suzerainty over the Murong state until 353 as the Murong accepted titles from them. An official in the Murong state, Dong Shou defected to Goguryeo. Han Chinese refugees migrated west into Han Chinese controlled Former Liang.
The descendants of northern Han Chinese aristocrats who fled the five barbarians uprising to move south with the Eastern Jin and the local southern Han Chinese aristocrats already in southern China combined to form the Chinese Southern aristocracy in the Tang dynasty, in competition with the northeastern aristocracy and the mixed Han-Xianbei northwestern aristocracy of the former Northern Zhou who founded the Sui dynasty and Tang dynasty. The southern aristocracy only intermarried with each other and viewed themselves as preserving Han culture.
Southern Chinese Daoism developed as a result of a merger of the religious beliefs of the local southern Han Chinese aristocrats and northern Han Chinese emigres fleeing the five barbarians. The Han aristocrats of both south and north were highly insular and closed against outsiders and descended from the same families who originally hailed from northern China.

## Analysis

Ming dynasty writer and historian Zhu Guozhen (1558-1632) remarked on how the Ming dynasty managed to successfully control the Mongols who surrendered to the Ming and were relocated into China to serve in military matters, unlike the Eastern Han dynasty and the Western Jin dynasty whose unsuccessful management of the surrendered barbarians led to rebellion:
   Late during the Eastern Han (25-220 C.E.), surrendering barbarians were settled in the hinterlands [of China]. In time, they learned to study and grew conversant with [matters of the] past and present. As a result, during the Jin dynasty (265-419), there occurred the Revolt of the Five Barbarian [Tribes](late in the third and early in the fourth centuries C.E.). During our dynasty, surrendering barbarians were relocated to the hinterlands in great numbers. Because [the court] was generous in its stipends and awards, [the Mongols are content to] merely amuse themselves with archery and hunting. The brave among them gain recognition through [service in] the military. [They] serve as assistant regional commanders and regional vice commanders. Although they do not hold the seals of command, they may serve as senior officers. Some among those who receive investiture in the nobility of merit may occasionally hold the seals of command. However [because the court] places heavy emphasis on maintaining centralized control of the armies, [the Mongols] do not dare commit misdeeds. As a consequence, during the Tumu Incident, while there was unrest everywhere, it still did not amount to a major revolt. Additionally, [the Mongols] were relocated to Guangdong and Guangxi on military campaign. Thus, for more than 200 years, we have had peace throughout the realm. The dynastic forefathers' policies are the product of successive generations of guarding against the unexpected. [Our policies] are more thorough than those of the Han. The foundations of merit surpass the Sima family (founders of the Eastern Jin) ten thousand fold. In a word, one cannot generalize [about the policies towards surrendering barbarians].