 The peace did not last two decades . In 1009 the Goryeo general Gang Jo murdered King <unk> of Goryeo and put King Hyeonjong of Goryeo on the throne with the intention of serving as the boy 's regent . The Liao immediately sent an army of 400 @,@ 000 men to Goryeo to punish Gang Jo ; however , after an initial period of military success and the breakdown of several attempts at peace negotiations , Goryeo and Liao entered a decade of continuous warfare . In 1018 the Khitans faced the most significant military defeat in the dynasty 's history , but by 1019 they had already assembled another large army to march on Goryeo . At this point both sides realized that they could not defeat each other militarily , so in 1020 King Hyeonjong resumed sending tribute to the Liao , and in 1022 the Liao officially recognized the legitimacy of King Hyeonjong 's reign . Goryeo would remain a vassal , and the relationship between Liao and Goryeo would remain peaceful until the end of the Liao dynasty . 
