Sui dynasty launched
four unsuccessful campaigns to subdue Goguryeo. The
Emperor Yang of Sui wanted to establish a Sui-led order in East Asia after unifying
China proper. Goguryeo opposed this and started to prepare for defense against Sui dynasty. The
Sui dynasty's reunification of China for the first time in centuries was met with alarm in Goguryeo, and
Pyeongwon of Goguryeo began preparations for a future war by augmenting military provisions and training more troops. Although Sui was far larger and stronger than Goguryeo, the Baekje-Silla Alliance which had previously driven Goguryeo from the Han Valley in the mid 6th century had fallen apart, and thus Goguryeo's southern border was secure. Initially, Goguryeo tried to appease Sui by offering tribute as Korean kingdoms had done under the
Tributary system of China. However, Goguryeo continued insistence on an equal relationship with Sui, its reinstatement of the imperial title "Taewang" (Emperor in Korean) of the East and its continued raids into Sui territory greatly angered the Sui Court. Furthermore, Silla and Baekje, both under threat from Goguryeo, requested Sui assistance against Goguryeo as all three Korean kingdoms had desired to seize the others' territories to rule the peninsula, and attempted to curry Sui's favor to achieve these goals. Goguryeo's expansion and its attempts to equalize the relationship conflicted with
Sui China and increased tensions. In 598, Goguryeo made a preemptive attack on
Liaoxi which led to the
Battle of Linyuguan, but was beaten back by Sui forces. This caused
Emperor Wen to launch a counterattack by land and sea that ended in disaster for Sui. As a result, the Sui launched a series of invasions that took place in the years 598, 612, 613, and 614. Sui's most disastrous campaign against Goguryeo was in 612, in which Sui, according to the History of the Sui Dynasty, mobilized 30 division armies, about 1,133,800 combat troops. Pinned along Goguryeo's line of fortifications on the
Liao River, a detachment of nine division armies, about 305,000 troops, bypassed the main defensive lines and headed towards the Goguryeo capital of Pyongyang to link up with Sui naval forces, who had reinforcements and supplies. However, Goguryeo was able to defeat the Sui navy, thus when the Sui's nine division armies finally reached Pyongyang, they didn't have the supplies for a lengthy siege. Sui troops retreated, but General
Ŭlchi Mundŏk led the Goguryeo troops to victory by luring the Sui into an ambush outside of Pyongyang. At the
Battle of Salsu, Goguryeo soldiers released water from a dam, which split the Sui army and cut off their escape route. Of the original 305,000 soldiers of Sui's nine division armies, it is said that only 2,700 escaped to Sui China. The 613 and 614 campaigns were aborted after launch—the 613 campaign was terminated when the Sui general
Yang Xuangan rebelled against
Emperor Yang, while the 614 campaign was terminated after Goguryeo offered a truce and returned Husi Zheng (斛斯政), a defecting Sui general who had fled to Goguryeo, Emperor Yang later had Husi executed. Emperor Yang planned another attack on Goguryeo in 615, but due to Sui's deteroriating internal state he was never able to launch it. Sui was weakened due to rebellions against Emperor Yang's rule and his failed attempts to conquer Goguryeo. They could not attack further because the provinces in the Sui heartland would not send logistical support. Emperor Yang's disastrous defeats in Korea greatly contributed to the collapse of the Sui dynasty. Goguryeo also engaged in many wars with the
Tang dynasty, but it eventually lost as
Silla took side with the Tang in the
Goguryeo–Tang War. In the winter of 642,
King Yeongnyu was apprehensive about
Yŏn Kaesomun, one of the great nobles of Goguryeo, and plotted with other officials to kill him. However, Yŏn Kaesomun caught news of the plot and killed Yeongnyu and 100 officials, initiating a
coup d'état. He proceeded to enthrone Yeongnyu's nephew, Go Jang, as
King Bojang while wielding de facto control of Goguryeo himself as the
generalissimo (). At the outset of his rule, Yŏn Kaesomun took a brief conciliatory stance toward Tang China. For instance, he supported
Taoism at the expense of
Buddhism, and to this effect in 643, sent emissaries to the Tang court requesting Taoist sages, eight of whom were brought to Goguryeo. This gesture is considered by some historians as an effort to pacify Tang and buy time to prepare for the Tang invasion Yŏn thought inevitable given his ambitions to annex Silla. However, Yŏn Kaesomun took an increasingly provocative stance against
Silla Korea and
Tang China. Soon, Goguryeo formed an alliance with Baekje and invaded Silla, Daeya-song (modern Hapchon) and around 40 border fortresses were conquered by the Goguryeo-Baekje alliance. Since the early 7th century, Silla had been forced on the defensive by both Baekje and Goguryeo, which had not yet formally allied but had both desired to erode Sillan power in the Han Valley. During the reign of King
Jinpyeong of Silla, numerous fortresses were lost to both Goguryeo and the continuous attacks took a toll on Silla and its people. During Jinpyeong's reign, Silla made repeated requests beseeching Sui China to attack Goguryeo.
Ansi City (in modern
Haicheng, Liaoning), which was the last fortress that would clear the
Liaodong Peninsula of significant defensive works and was promptly put under siege. Initially, Taizong and his forces achieve great progress, when his numerically inferior force smashed a Goguryeo relief force at the
Battle of Mount Jupil. Goguryeo's defeat at Mount Jupil had significant consequences, as Tang forces killed over 20,000 Goguryeo soldiers and captured another 36,800, which crippled Goguryeo's manpower reserves for the rest of the conflict. failing to capture Ansi Fortress after a protracted siege that lasted more than 60 days. Emperor Taizong invaded Goguryeo again in 647 and 648, but was defeated both times. court: Silla, Baekje, and Goguryeo.
Portraits of Periodical Offering, circa 650 AD, Tang dynasty of
Samarkand. They are identified by the two feathers on top of their head. 648–651 AD,
Afrasiab murals, Samarkand. Emperor Taizong prepared another invasion in 649, but died in the summer, possibly due to an illness he contracted during his Korean campaigns. However, Emperor Gaozong, too, was unable to defeat Goguryeo led by
Yŏn Kaesomun; one of Yŏn Kaesomun's most notable victories came in 662 at the
Battle of Sasu (蛇水), where he annihilated the Tang forces and killed the invading
Nanman general Pang Xiaotai (龐孝泰) and all 13 of his sons. Therefore, while Yŏn Kaesomun was alive, Tang could not defeat Goguryeo. In the summer of 666,
Yŏn Kaesomun died of a natural cause and Goguryeo was thrown into chaos and weakened by a succession struggle among his sons and younger brother. He was initially succeeded as
Dae Mangniji, the highest position newly made under the ruling period of Yŏn Kaesomun, by his oldest son
Yŏn Namsaeng. As Yŏn Namsaeng subsequently carried out a tour of Goguryeo territory, however, rumors began to spread both that Yŏn Namsaeng was going to kill his younger brothers
Yŏn Namgŏn and
Yŏn Namsan, whom he had left in charge at
Pyongyang, and that Yŏn Namgŏn and Yŏn Namsan were planning to rebel against Yŏn Namsaeng. When Yŏn Namsaeng subsequently sent officials close to him back to Pyongyang to try to spy on the situation, Yŏn Namgŏn arrested them and declared himself
Tae Mangniji, attacking his brother. Yŏn Namsaeng sent his son
Ch'ŏn Hŏnsŏng (泉獻誠), as Yŏn Namsaeng changed his family name from Yŏn (淵) to Ch'ŏn (泉) observe naming taboo for Emperor Gaozu, to Tang to seek aid.
Emperor Gaozong saw this as an opportunity and sent an army to attack and destroy Goguryeo. In the middle of Goguryeo's power struggles between Yŏn Kaesomun's successors, his younger brother, Yŏn Chŏngto, defected to the Silla side. The alliance with Silla had also proved to be invaluable, thanks to the ability to attack Goguryeo from opposite directions, and both military and logistical aid from Silla. Silla thus unified most of the Korean peninsula in 668, but the kingdom's reliance on China's Tang dynasty had its price. Tang set up the
Protectorate General to Pacify the East, governed by
Xue Rengui, but faced increasing problems ruling the former inhabitants of Goguryeo, as well as Silla's resistance to Tang's remaining presence on the Korean Peninsula. Silla had to forcibly resist the imposition of Chinese rule over the entire peninsula, which lead to the
Silla–Tang Wars, but their own strength did not extend beyond the
Taedong River. Later, Tang China considered
Balhae as a
tributary state, whereas Balhae strongly opposed such view. As the
Emperor of China saw himself as the emperor of the entire civilized world, it was not possible for such an emperor to have equal diplomatic relations with any other regional powers, and as such all diplomatic relations in the region were construed by the Chinese as tributary regardless of the intention of those regions. == Liao, Jin, Song and Goryeo ==