During the Western Han Dynasty, Emperor Wu of the Han Dynasty sent troops to defend North Korea in 109 BC and destroyed it the following year. Four counties, Xuantu, Lelang, Zhenfan and Lintun, were established there. During the Eastern Han Dynasty, under the pressure of Mie Gu and Ma Han, they gave up all of Xuantu County and part of Lelang County, and the territory under their jurisdiction was reduced. At the end of the Eastern Han Dynasty, the Gongsun family occupied Lelang County, developed southward and established Daifang County (governing the south of Shaliyuan, North Huanghai Province, North Korea today). The Gongsun family and later the Cao Wei and Western Jin Dynasties basically controlled the area east of the Beidafeng Mountains in northern Korea today. Soon, Goguryeo rose and became increasingly powerful. By the end of the Western Jin Dynasty, it completely occupied Lelang County. At the same time, the Mahahan regime in the south also annexed Daifang County. This ended the history of the Central Plains Dynasty setting up formal administrative regions on the Korean Peninsula. Goguryeo continued to invade the west and occupied Liaodong and Xuantu counties belonging to the former Yan and Later Yan (Xuantu County was moved to the east of present-day Shenyang City at that time). In 404, it also seized the land east of the Liao River from the Northern Wei Dynasty. In 427, it moved its capital Today in Pyongyang, Korea, the Central Plains Dynasty and Goguryeo divided the Liao River to rule. Emperor Yang of the Sui Dynasty's three expeditions to Goryeo did not restore the Central Plains Dynasty's rule in Liaodong. In 668, the Tang and Silla allied forces attacked Goguryeo. After a month of fighting, Tang Gaozong finally fulfilled Taizong's last wish. , destroyed Goguryeo, and established the Andong Protectorate in Pyongyang, which governed nine governors' offices, 42 states, and 100 counties. However, by 676, the Tang army was forced to withdraw from Korea, and the Andong Protectorate's headquarters was also moved. To Liaodong (today's Liaoyang). The frontier regime Bohai arose and occupied parts of today's northeastern China, northern Korea and the Russian Far East. It was later destroyed by the Liao. The territory of the Liao also expanded to northern Korea. The Jin who replaced the Liao also followed the Liao's rule in Korea. The territory of the Northeast. Mongolia (Yuan) became stronger and owned the northeastern part of the Korean Peninsula. Wang's Korea became a vassal of the Yuan Dynasty. Zhu Yuanzhang, the emperor of the Ming Dynasty, listed Korea as a country that would never be conquered. The Ming Dynasty and Korea officially used the Yalu River as the border. Since then, China and North Korea have been bounded by the Yalu River.