In early 10th century, Goryeo newly emerged on the Korean peninsula, while the Sung arose in China, and the Liao Dynasty of the Khitan emerged in Manchuria. As the Khitan began to expand forces, it collided with Goryeo, which was pursuing a northern expansion policy. From the beginning, however, Goryeo, rejected the Khitan, regarding it as a barbaric tribe that had destroyed Balhae.
Goryeo had diplomatic relations with the Sung Dynasty which had reunited China and was in conflict with the Khitan.
In order to attack the Sung, the Khitan first mounted attacks on Goryeo, which was supportive of the Sung. During the first invasion, Seo Hee made successful diplomatic maneuvers.
As a result, the Khitan acknowledged that Goryeo was the successor to Goguryeo and arrived at a compromise, Goryeo would be returned the six garrisons in the area east of the Yalu in return for Goryeo severing ties with Sung China. However, when Goryeo continued to maintain friendly ties with the Sung, and continued to alienate the Khitan, it invaded Goryeo once again. At this point, Gaegyeong fell to the Khitan army, but once again forged a peace agreement with the Khitan on the condition that it would maintain friendly relations with the Khitan. It then defeated the Khitan who were withdrawing. Incensed, the Khitan mounted their third great invasion of Goryeo, but this time the Khitan army was all but annihilated by a massive Goryeo attack at Gwiju, executed by Gang Gam-cham.
Following the war, Goryeo built fortresses surrounding Gaegyeong, established a wall all along the border that stretched a thousand li to bolster the defense against the northern people.
Although Seo Hee was a civil official, he excelled both in literary and military arts. He was a man of reason and was in good graces with the king. When the Khitan mounted their invasion, some had strongly contended to seek reconciliation by giving away the land north of Seogyeong to the Khitan. Seo Hee, however, insisted on fighting, met the enemy commander Hsiao Sun-ning and made a bold ploy at negotiation. Seo Hee asserted that “Goryeo was the successor of Goguryeo, and that since the area up to the Yalu was Goryeo territory, he would open diplomatic relations with the Khitan if it would drive away the Jurchen from the area and help Goryeo regain the ancient territories of Goryeo.” Seo Hee succeeded in impressing the enemy with his dazzling tongue rather than with arrows and bows. Hsiao, who acknowledged that Seo Hee’s assertions were correct, accepted Seo Hee’s demand and withdrew his forces. Goryeo drove back the enemy without engaging in battle, and accomplished the feat of expanding its territory up to the Yalu. It was the most valuable triumph in the history of Korea.
Gang Gam-chang was a member of a gentry family that had contributed in the founding of Goryeo. He passed the state examination with the ranking of first and was appointed to a high ranking position. When the 100,000-strong army of the Khitan, led by Hsiao Pai-ya, invaded Goryeo, Gang Gam-chan, serving as the commander-inchief, drove the invaders back. Gang Gam-chan dammed the river water to prepare against enemy invasion, and released the water on the invading enemy. On another occasion, when the Khitan army invaded Gaegyeong, he relocated all the residents and the food elsewhere and drove back the enemy. He further achieved the virtual destruction of all of the Khitan army that were retreating in Gwiju. This is known as the‘ Great Victory at Gwiju’.