# Yan (Three Kingdoms)

Yan (Chinese: 燕) was a Chinese kingdom that existed from July 237 to September 238 CE in the Liaodong Peninsula during the Three Kingdoms period. Its predecessor was an independent regime ruled by Gongsun Du and his son Gongsun Kang from 190 to 237. Though it only claimed independence in 237, historians such as Wang Zhongshu and Hou Tao consider it to be a de facto independent regime from when Gongsun Du established his rule in Liaodong in 190. Although it existed during the Three Kingdoms period, it is not counted as one of the eponymous three kingdoms: Cao Wei, Shu Han, and Eastern Wu. Nevertheless, writers such as Kang Youwei consider it to be a "fourth country".

## Predecessors
### Gongsun Du

Gongsun Du's father Gongsun Yan (公孫延) lived in Xuantu Commandery where Gongsun Du became minister in 170. Although he was dismissed from his post, he became administrator of Liaodong Commandery in 190 or 189 on the recommendation of Dong Zhuo. Gongsun Du established a monarchial rule and completely controlled Liaodong. He split Liaodong into three commanderies, creating Liaoxi Commandery and Zhongliao Commandery out of Liaodong.
Liaodong was adjacent to Goguryeo, whose rulers initially cooperated with Gongsun Du but subsequently frequently quarreled. Gongsun Du repeatedly attacked both Goguryeo and Wuhuan. In 196, the warlord Cao Cao gave Gongsun Du the titles of "general of military might" and "lord of Yongning Xiang". However, Gongsun Du rejected the latter title, considering himself the king of Liaodong, rather than a mere lord. The title would be given to his younger son Gongsun Gong after Gongsun Du's death. Gongsun Du military activities are largely credited with leading to the Gongsun family's rise.

### Gongsun Kang

When Gongsun Du died in 204, his son Gongsun Kang took over, and shortly after exploited a succession feud in Goguryeo. Though the candidate supported by Gongsun Kang was eventually defeated, the victor Sansang of Goguryeo was compelled to move his capital southeast to Hwando (present-day Ji'an, Jilin) on the Yalu River, which offered better protection. Gongsun Kang moved in and restored order to the Lelang Commandery, establishing the new Daifang Commandery by splitting off the southern part of Lelang.
In 207, Gongsun Kang killed Yuan Shao's sons Yuan Shang and Yuan Xi, and gave their heads to Cao Cao. Gongsun Kang's act was seen as one of compliance to Cao, an attitude his son Gongsun Yuan would reverse.

### Gongsun Gong

After Gongsun Kang's death, his two sons Gongsun Huang and Gongsun Yuan were too young to succeed to the title. As a result, his brother Gongsun Gong took the throne. However, he suffered from diabetes (yin xiao, Chinese: 陰消) and was infertile. After Cao Pi took over Eastern Han, he told Gongsun Gong to give a son as a hostage to Cao. Gongsun Huang, Gongsun Kang's elder son, was sent to Luoyang. Gongsun Gong dared not be aggressive towards Cao Wei, and Gongsun Yuan considered him a coward. Claiming that he would restore Liaodong to glory, he forced Gongsun Gong from the throne, imprisoned him and became ruler in December 228.

### Gongsun Yuan

Gongsun Yuan claimed friendship with the Eastern Wu and sent envoys in May 229. In February 230, Wei promoted Gongsun Yuan to cheqi general (Chinese: 車騎將軍; lit. 'General of the Chariots and Cavalry'). In March 232, Sun Quan sent envoys to Gongsun Yuan to ask for horses, which were supplied. However, when returning in September, the envoys were attacked by Tian Yu. Most of their goods were lost and one of the envoys was killed. In October 232, Gongsun Yuan sent envoys accepting a position as a vassal of the Eastern Wu. In March 233, Wu gave him the title of the "King of Yan", and sent two envoys to him; they were killed by Gongsun Yuan and their heads sent to Luoyang, and Gongsun Yuan accepted vassalship from Cao Wei. Gongsun Yuan's attitude angered both Cao Wei and Eastern Wu; Cao Rui (emperor of Cao Wei) and Sun Quan (emperor of Eastern Wu) both vowed to kill him.
In 237, Cao Wei general Guanqiu Jian sent troops to attack Gongsun Yuan, but was defeated because of heavy rain.

## Gongsun Yuan's reign

After Guanqiu Jian's defeat, Gongsun Yuan claimed independence in July, and used the era date Shaohan (Chinese: 紹漢); the new country had a government and officials, and set up four commanderies: Liaodong, Xuantu, Lelang and Daifang, and in January 238, Gongsun Yuan resumed relations with Wu, hoping for military reinforcements from it.

### Downfall

In June 238, after planning with Cao Rui, the Cao Wei general Sima Yi led 40,000 soldiers to attack Gongsun Yuan; after a siege lasting three months, Gongsun Yuan's headquarters fell to Sima Yi, who received assistance from Goguryeo. Many who served in the Yan state were massacred. Gongsun Gong was released from prison.

## Relations with Goguryeo

Goguryeo frequently battled with the Gongsun clan despite initial cooperation. In 197, hostilities between the Gongsuns and Goguryeo first broke out when Balgi, elder brother of King Sansang of Goguryeo, staged a rebellion and gained the support of Gongsun Du. Sansang's younger brother Gyesu repelled the attack, defeating Gongsun Du, and Balgi committed suicide. Gongsun Kang took advantage of a succession feud in Goguryeo and launched an attack again in 209, defeating Goguryeo and forcing it to move its capital. In Sima Yi's conquest of Yan, Goguryeo sent thousands of troops to assist Sima Yi.

## Impact
### Relations between Goguryeo, Cao Wei and Eastern Wu

After Wu's envoys were killed by Gongsun Yuan in 233, some of their troops escaped to Goguryeo and set up an Eastern Wu-Goguryeo alliance. In 234, Cao Wei sent envoys to set up an alliance with Goguryeo. Between Cao Wei and Eastern Wu, Goguryeo chose Cao Wei – killing Eastern Wu's envoys in 234 and another set in 236. In 238, Goguryeo sent troops to assist in the defeat of Gongsun Yuan. The Cao Wei-Goguryeo alliance broke down in 242, when King Dongcheon of Goguryeo plundered the Liaodong district of Xi'anping (西安平; near present-day Dandong) at the mouth of the Yalu River. Cao Wei launched a war in retaliation, which ended in a Cao Wei victory and destroyed the Goguryeo capital of Hwando, sent its King fleeing, and broke the tributary relationships between Goguryeo and the other tribes of Korea that formed much of Goguryeo's economy. Although the King evaded capture and eventually settled in a new capital, Goguryeo was reduced to such insignificance that for half a century there was no mention of the state in Chinese historical texts.

### Five Barbarians

Sima Yi's conquest of Gongsun Yuan was attributed partly with the Uprising of the Five Barbarians Incident, through increasing the financial power of Liaodong and forcing Han people in Liaodong to move inland, allowing the Xianbei to enter Liaodong.