During the reign of
King Mokjong, Yang Kyu served as the director of the Ministry of Justice (). In 1010, during the Liao invasion, Yang was appointed as military inspector () of Sŏbungmyŏn. He defeated the Liao army at Hŭnghwa-jin, resisting calls to surrender, and prevented the fortress' fall. The Liao army lifted the siege and left Hŭnghwa-jin. The Liao defeated
Kang Cho's 300, 000 man army at T'ongju (modern day
Sonchon County). The Khitans sent No Chŏn (), a captured Goryeo official, with forged edict purporting to be from Kang Cho asking Yang to surrender the fortress. Yang refused as he would only take orders from the king, not Kang. After this, Yang left Hŭnghwa-jin with 700 men and regrouped with 1000 man strong remnant of Kang Cho's army at T'ongju. With the combined 1,700 man army, Yang recaptured Kwakchu (), modern-day
Chongju, from a Liao force of 6,000. The liberated civilian population of 7,000 was relocated to T'ongju. ==In popular culture==