Chang'an was captured by the state of Han-Zhao, one of the Sixteen Kingdoms. They had previously sacked Luoyang in 311, and would go on to execute the Jin emperor in 318. The capture of Chang'an marks the end of the Western Jin period.