The Kitan and the Jurchen
Throughout the first half of the Koryo period, the dynasty had trouble securing its northern border. In the early Koryo period, during the mid-10th century, the northwest neighbor was the Kitan, a coalition of north-ern tribal peoples, including some of the Magal people who had once been part of the Parhae kingdom.
When Koryo was founded, it took some of the territory of Parhae, but the balance joined the alliance to the north that would become the Kitan tribes, which eventually allied to form the Liao dynasty (907–1125). The Kitan attacked Koryo along their common border on several occasions.
In 1018 they mounted a large attack but were annihilated by a massive Koryo counterattack led by General Kang Kamchan (948–1031), one of Korea’s great military heroes.
The Kitan were replaced by the Jurchen, who founded an even more powerful dynasty to the northeast called Jin (1115–1234). The Jurchen similarly caused border problems for Koryo in the early 12th century, but Koryo was able either to beat back the Jurchen or to recognize them and submit a tribute to them.
In the late 11th century Hanpu, the ancestor of the founder of the Jin dynasty, had taken refuge from the Kitan in the northern province of Koryo. This inspired a degree of closeness between the Jurchen and Koryo that mitigated some of their hostilities. The Chinese-style Jin dynasty quickly grew in power.
By 1125 the Jurchen kingdom had captured the northern portion of China, forcing the Song dynasty into the lower half of China and inaugurating the period known as the Southern Song dynasty (1127–1279).
The Koryo court tried to maintain relations with both the Jurchen Jin dynasty and the Southern Song dynasty. Though the Southern Song controlled only the southern half of China, their rule was a time of great cultural developments.
The Neo-Confucian movement, a revival of Confucianism among Chinese, Koreans, and Japanese, was founded by Zhu Xi (1130–1200), the Cheng brothers, and others during the Southern Song dynasty. Koreans came to revere this philosophy, and Neo-Confucianism would have a dramatic impact on Korea in the centuries that followed.