清川江
Relations between Goryeo and the Khitans were hostile after the Khitans destroyed Balhae. Goryeo would not recognize the Liao dynasty and supported the fledgling Song dynasty, which had formed south of the Khitans' territory. Though the Khitans would have preferred to attack China, they invaded Goryeo in 993. Khitan forces failed to advance beyond the Chongchon River and were persuaded to withdraw, though Khitan dissatisfaction with Goryeo's conquest of the Jurchen prompted a second invasion in 1010. This time the Khitans, led by their emperor, sacked the capital city Kaesong. A third and final invasion in 1018 was repelled by Goryeo's forces, bringing an end to 30 years of war between the rivals.