The Sixteen Kingdoms (simplified Chinese: 十六国; traditional Chinese: 十六國; pinyin: Shíliù Guó), less commonly the Sixteen States, was a chaotic period in Chinese history from AD 304 to 439 when northern China fragmented into a series of short-lived dynastic states. Most of these regimes were created by groups such as the Xiongnu, Xianbei, Di, Jie, and Qiang, who had moved into northern and western China over earlier centuries and rose in rebellion against the Western Jin dynasty in the early fourth century. Some states were founded by the Han as well. Regardless of their rulers' background, every state adopted dynastic institutions in the Han tradition and styled itself as a legitimate monarchy. These states often fought one another and also contended with the Eastern Jin dynasty, which governed the south after the collapse of Western Jin in 317. The era ended in 439, when Northern Wei, founded by the Tuoba clan of the Xianbei, reunified the north. The Eastern Jin dynasty had already collapsed in 420 and been replaced by the Liu Song dynasty, the first of the Southern Dynasties. After the consolidation of the north, Chinese history entered the period known as the Northern and Southern Dynasties.
The term "Sixteen Kingdoms" was first used by the 6th-century historian Cui Hong in the Spring and Autumn Annals of the Sixteen Kingdoms and refers to the five Liangs (Former, Later, Northern, Southern and Western), four Yans (Former, Later, Northern, and Southern), three Qins (Former, Later and Western), two Zhaos (Han/Former and Later), Cheng-Han and Xia. Cui Hong did not count several other kingdoms that appeared at the time including the Ran Wei, Zhai Wei, Chouchi, Duan Qi, Qiao Shu, Huan Chu, Tuyuhun and Western Yan. Nor did he include the Northern Wei and its predecessor Dai, because the Northern Wei is considered to be the first of the Northern Dynasties in the period that followed the Sixteen Kingdoms.