Goryeo–Khitan War
The Goryeo–Khitan War (; ) was a series of 10th- and 11th-century conflicts between the Goryeo dynasty of Korea and the Khitan-led Liao dynasty of China near the present-day border between China and North Korea.

Background

During the Three Kingdoms of Korea period, Goguryeo occupied the northern Korean Peninsula and parts of Manchuria. With Goguryeo's fall in 668, Silla unified the Three Kingdoms, while northern parts of Goguryeo territory were briefly occupied by Silla's ally, Tang dynasty. Later, the state of Balhae was formed on this territory.

Right after the fall of Goguryeo, the Göktürks were divided and eventually driven out from most of Central Asia by the Tang dynasty. Another Turkic tribe, the Uyghurs, replaced the Göktürks, but their control was weak.

As Balhae, the Uyghur and the Tang dynasty weakened, the Khitan people, a nomadic confederation inhabiting Manchuria and eastern Mongolian Plateau, grew stronger and began to expand their territory. Following Tang's collapse in 907, China proper experienced a long period of civil war that lasted until 979.

In 916, the Liao dynasty was founded by the Khitan chief Yelü Abaoji, known posthumously as the Emperor Taizu of Liao, replacing the Uyghurs as the dominant power on the Mongolian Plateau after the Yenisei Kyrgyz and the Tang dynasty defeated the Uyghur Khaganate and left a power vacuum.

Goryeo–Khitan relations
On the Korean Peninsula, Silla was succeeded by Goryeo in 918. The Liao dynasty conquered Balhae in 926, with Balhae refugees forced to migrate by the Liao Empire, a portion of its people including the ruling class moved south and joined the newly founded Goryeo dynasty. 

The Liao dynasty took control of the Sixteen Prefectures south of the Great Wall for helping the foundation of the short-lived Later Jin dynasty (936-947), which ruled only Zhongyuan, a small part of China.

In 922, the Liao emperor Yelü Abaoji sent horses and camels to Goryeo as gifts of friendship. However, when Balhae fell to the Khitan a few years later, King Taejo embraced refugees from Balhae and pursued a policy of northern expansion (possibly enabled by the absence of a fellow Korean kingdom in what was once Goguryeo territory). In 942, the Khitan sent another 50 camels to Goryeo, but this time Taejo refused the gift, exiled the envoy to an island, and had the camels starved to death.

Succeeding Goryeo rulers continued the anti-Liao policy. Jeongjong, 3rd Monarch of Goryeo, raised an army to defend against the Liao. Gwangjong of Goryeo built fortresses along the northwest and aggressively developed the military fortifications of present-day Pyongan and Hamgyong provinces.

Liao's expansion
In 962, Gwangjong allied with the Song dynasty of central China and pursued a northern expansion policy. Additionally, some Balhae refugees had formed a small state called Jeongan in mid-Yalu River region and allied with Song and Goryeo against the Liao.

The Liao dynasty eventually regained internal stability under the strong leadership of Emperor Shengzong of Liao, who sought to counter regional isolation. After conquering Jeongan-guk in 986 and attacking the Jurchens on the lower Yalu River in 991, the Liao dynasty initiated attacks against Goryeo.

First Invasion

In 993, the Liao dynasty invaded Goryeo's northwestern border with an army that the Liao commander claimed to number 800,000. After a military stalemate, negotiations began between the two states, producing the following concessions: Firstly, Goryeo formally ended all relations with the Song dynasty, agreed to pay tribute to Liao and to adopt Liao's calendar. Secondly, after negotiations led by the Goryeo diplomat Seo Hui, Goryeo formally incorporated the land between the border of Liao and Goryeo up to the Yalu River, which was at the time occupied by troublesome Jurchen tribes, citing that in the past the land belonged to Goguryeo. With this agreement, the Liao forces withdrew. However, in spite of the settlement, Goryeo continued to communicate with Song, having strengthened its defenses by building fortresses in the newly gained northern territories.

Second Invasion

In 1009, General Gang Jo of Goryeo led a coup against King Mokjong, killing him and establishing military rule. The Liao dynasty attacked with 400,000 troops in 1010, claiming to avenge the murdered Mokjong.
Gang Jo blocked the Liao's first attack, but he was defeated in the second one and was executed. King Hyeonjong of Goryeo was forced to flee the capital, which was sacked and burnt by the Liao, to Naju temporarily. Unable to establish a foothold and to avoid a counterattack by the regrouped Goryeo armies, the Liao forces withdrew. Afterward, the Goryeo king sued for peace, but the Liao emperor demanded that he come in person and also cede key border areas to him; the Goryeo court refused the demands, resulting in a decade of hostility between the two nations, during which both sides fortified their borders in preparation of war. Liao attacked Goryeo in 1015, 1016, and 1017, but the results were indecisive.

Third Invasion

In 1018, Liao assembled an army of 100,000 troops to invade Goryeo. In preparation, General Gang Gam-chan ordered a stream to the east of Heunghwajin to be dammed. When the Liao troops crossed the Yalu River, Gang Gam-chan opened the dam and attacked the enemy troops with 12,000 mounted troops, catching them by surprise, inflicting severe losses, and cutting off their line of retreat. The Liao troops soldiered on and headed toward the capital, but were met with stiff resistance and constant attacks, and were forced to retreat back north. Gang Gam-chan and his troops waited at Gwiju and engaged the approaching Liao army, annihilating most of them. Barely a few thousand Liao troops survived after the Battle of Gwiju. In the next year the Liao had assembled another large army in order to launch another invasion. However, understanding the difficulty of achieving a decisive victory, the two nations signed a peace treaty in 1022.

References

Sources

External links 
Korea Britannica 
Doosan Encyclopedia

 

 
History
Wars involving Imperial China
Wars involving Goryeo
10th century in Korea
11th century in Korea