Sima Yi's Liaodong campaign occurred in 238 CE during the Three Kingdoms period of Chinese history. Sima Yi, a general of the state of Cao Wei, led a force of 40,000 troops to attack the kingdom of Yan led by warlord Gongsun Yuan, whose clan had ruled independently from the central government for three generations in the northeastern territory of Liaodong (present-day eastern Liaoning). After a siege that lasted three months, Gongsun Yuan's headquarters fell to Sima Yi with assistance from Goguryeo (one of the Three Kingdoms of Korea), and many who served the Yan Kingdom were massacred. In addition to eliminating Wei's rival in the northeast, the acquisition of Liaodong as a result of the successful campaign allowed Wei contact with the non-Han peoples of Manchuria, the Korean Peninsula, and the Japanese archipelago. On the other hand, the war and the subsequent centralisation policies lessened the Chinese grip on the territory, which permitted a number of non-Han states to form in the area in later centuries. Background Liaodong Commandery of You Province, part of present-day Northeast China, was situated at the northeastern fringe of Eastern Han Empire, surrounded by the Wuhuan and Xianbei nomads in the north and Goguryeo and Buyeo peoples in the east. Its capital was the city of Xiangping. In the autumn of 189, Gongsun Du, a native of Liaodong, was appointed as the Administrator of Liaodong (), and thus began the Gongsun family's rule in the region. Taking advantage of his distance from central China, Gongsun Du stayed away from the chaos which accompanied the effective end of Han rule, expanded his territories to include the commanderies of Lelang and Xuantu, and eventually proclaimed himself as Marquis of Liaodong (). His son Gongsun Kang, who succeeded him in 204, created the Daifang Commandery and maintained the autonomy of Liaodong by aligning himself with the warlord Cao Cao. Gongsun Kang died some time around the abdication of Emperor Xian of Han to Cao Pi, son of Cao Cao, and Gongsun Kang's brother Gongsun Gong became the new ruler of Liaodong. Gongsun Gong was described as incompetent and inept, and he was soon overthrown and imprisoned by Gongsun Kang's second son Gongsun Yuan in 228. Soon after Gongsun Yuan came to power in Liaodong, China was, for the most part, split into three: Cao Wei in the north, Shu Han in the southwest, and Eastern Wu in