Following the fall of the Han dynasty, Korea was set free of China, leaving only northern Vietnam remaining under Chinese control, and the Three Kingdoms era temporarily halted Chinese expansionism. Nonetheless, the Cao Wei, Shu Han and Eastern Wu managed to extend its territorial gains in some parts under their territorial control. Once the Three Kingdoms ended and establishment of the Jin dynasty, Chinese expansionism stopped becoming the main headline for four centuries, as China was in dire need to consolidate back its borderland following its significant population losses.