Soon after this,
Emperor Shengzong of Liao attacked Goryeo during the fall of 1010, under the pretext that Kang Cho had committed regicide. The newly installed King Hyeonjong gave Kang 300,000 men under his command to stop the Khitan invaders. According to the
Goryeosa, a 400,000-man
Liao army invaded Goryeo territory. Liao first attacked but failed to capture the fort of
Heunghwa-jin, whose defender was General
Yang Kyu. Next, the Liao finally headed to the city of Tongju, which is where Kang Cho and 300,000 Goryeo troops were waiting. Kang Cho set up an ambush on a narrow pass that the Liao army was inevitably going to have to pass. There, he directly led his troops in a three-pronged attack when the Liao came. The Liao soldiers were forced to retreat and 10,000 died during this ambush. The enemy troops again attacked Tongju but faced a humiliating defeat with severe casualties. The Liao commander launched another attack on the city, with Kang Cho as his main target. The Liao were defeated a third time, and were forced to retreat once more. In one last-ditch effort, the Liao army came attacking once more, but this time, Kang Cho did not directly orchestrate the attack and played
baduk with one of his lieutenants instead, thinking that victory was a given. In the same time, Liao general Yelü Pennu led the Khitan army to attack and capture Samsu (). However, Kang Cho did not take any measures to defend against the Khitans. Then one of Kang Cho's men told his plan to the Liao. Liao soldiers pierced through the city's defenses. After the Khitan army launched a surprise attack, the Goryeo army was defeated, finally 30,000 Goryeo soldiers were killed and Kang Cho was captured. Emperor Shengzong sought to convince Kang Cho to defect to the Khitans and serve him. Kang refused to surrender even under torture to the emperor, who in turn executed Kang. ==Place in history and comparison to Yŏn Kaesomun==