In 661 AD, a northern invasion into Koguryo by the T'ang and a southern invasion by Silla were not successful, but they did weaken Koguryo defenses.
During this critical time, the king of Koguryo, Yon Kae So Mum, died. leaving his brother and two sons battling for power. Due to Koguryo's internal strife, the continuous battles, and a Koguryo defector named Namsaeng, Koguryo was finally defeated in 668 AD, by the T'ang (under the leadership of Li Chi, invading from the north) and Silla (led by Kim In Mum) attacking from the south.
With Koguryo defeated, Silla went to war with the T'ang. Silla, Koguryo, and Paekche unified as a single people to battle the Chinese. China finally conceded and agreed that Silla would rule all of Korea, while still acknowledging the Chinese emperor. The land south of the Taedong River was unified under one common Silla government.