In regard to the Korean peninsula, Gwanggaeto defeated Baekje, the then most powerful of the Three Kingdoms of Korea, in 396, capturing the capital city of Wiryeseong in present-day Seoul. In 399, Silla, the southeastern kingdom of Korea, sought aid from Goguryeo due to incursions by Baekje troops and their Wa allies from the Japanese archipelago. Gwanggaeto dispatched 50,000 expeditionary troops, crushing his enemies and securing Silla as a de facto protectorate; he thus subdued the other Korean kingdoms and achieved a loose unification of the Korean peninsula under Goguryeo. In his western campaigns, he defeated the Xianbei of the Later Yan empire and conquered the Liaodong peninsula, regaining the ancient domain of Gojoseon.