Yan at the Battle of Ningping, where 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 the capital Luoyang open to capture. Upon entering the city in 311 A.D., the invaders 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 were killed. Gou Xi was also defeated and captured by Shi Le at Mengcheng County. Despite the loss of the emperor and the capital, the Western Jin would continue for another five years. In 312, a group of Jin generals recaptured the important city of Chang’an, which had been lost to Han Zhao a year prior. They then acclaimed the 12-year-old Emperor Min of Jin (Emperor Huai’s nephew) as the new emperor. Elsewhere, Jin governors continued to resist Han Zhao. Most notable of these governors were Liu Kun in Bingzhou, Wang Jun in Youzhou, Sima Bao in Qinzhou and Zhang Gui in Liangzhou. Jin also received support from their Xianbei subjects, the Tuoba and Duan clan, and, while mostly remaining neutral, the Murong clan in Liaodong remained a vassal of Jin. However, the Jin leaders had conflicting goals and often did not trust each other. Han Zhao was able to exploit this weakness and defeat them one by one. In 316, Han Zhao forces reclaimed Chang'an and captured Emperor Min, thus ending the Western Jin dynasty. Sixteen Kingdoms and Eastern Jin dynasty The creation of Han Zhao and Cheng Han is often seen as the beginning of the Sixteen Kingdoms, a period of short-lived states in northern China (with the exception of Cheng Han) that lasted between 304 and 439. In 319, just three years after Chang’an fell, Shi Le, would break away from Han Zhao and form the Later Zhao. Meanwhile, as Jin gradually lost control over the north, the Zhang clan of Liangzhou and the Murong clan of Liaodong would gain full autonomy over their respective territory, leading to the creation of the Han-led Former Liang in 320 and the Xianbei-led Former Yan in 338. Other states that existed during this time but were not listed as part of the Sixteen Kingdoms were the Di-led Chouchi (established in 296)