The chaos following the fall of the Han Dynasty, the former Han commanderies had broken free of control and were ruled by various independent warlords. Surrounded by these commanderies, who were governed by aggressive warlords, Goguryeo moved to improve relations with the newly created Wei Dynasty of China and sent tribute in 220 CE. In 238 CE, Goguryeo entered into a formal alliance with the Wei to destroy the Liaodong commandery. When Liaodong was finally conquered by Wei, cooperation between Wei and Goguryeo fell apart and Goguryeo attacked the western edges of Liaodong, which incited a Wei counterattack in 244. On this occasion, Wei reached and destroyed the Goguryeo capital at Mt. Hwando. It is said that the king of Goguryeo, with his army destroyed, fled alone and sought refuge with the Okjeo tribes in the east.
The Wei armies thought they had destroyed Goguryeo and soon left the area. However, in only 70 years, Goguryeo rebuilt their capital at Mt. Wandu and again began to raid Liaodong, Lelang and Xuantu commandaries. As Goguryeo extended its reach into the Liaodong peninsula, the last Chinese commandery at Lelang was conquered and absorbed by Micheon of Goguryeo in 313, bringing the northern part of the Korean peninsula into the fold [19]. From that point on, until the 7th century C.E., territorial control of the peninsula would be contested primarily by the Three Kingdoms of Korea.