When Gwanggaeto the Great ruled Goguryeo, the Chinese mainland was dominated by five non-Han Chinese peoples and divided into multiple states. During Gwanggaeto's time, Goguryeo invaded Later Yan and conquered Liaoning, but when Jangsu came to the throne, the chaos in northern China was coming to an end. The unification of northern China by Northern Wei became a crucial point for both Goguryeo and the southern dynasties of China. However, Jangsu was able to use the political situation in China by manipulating the northern and southern Chinese states to his advantage.