Silla–Tang War

The Silla–Tang War occurred in the 7th century between the Korean Silla kingdom and the Chinese Tang empire and began in the geopolitical context immediately following the conquest of Goguryeo and Baekje by Tang. Rather than a formal war, it proved to be more of a series of military engagements between the two powers, formerly allies, with each side attempting to secure its gains from the Goguryeo-Tang War. This victory for Silla, and the maintenance of Silla's independence, is generally regarded as a critical turning point in Korean history.

Context
The Silla-Tang alliance, which had defeated both the Korean kingdoms of Baekje and Goguryeo, resulted in the occupation of the former territories of both of these kingdoms by coalition (i.e. Silla and Tang) armies. After the fall of Goguryeo in 668 AD, the Tang Emperor created the office of Protectorate General to Pacify the East and attempted to place the entire Korean Peninsula, including its erstwhile independent ally Silla, under its rule. The Silla-Tang alliance subsequently fell apart as the Tang tried to establish dominion over the Korean Peninsula through this new office and its former ally Silla resisted these efforts.

King Munmu of Silla assembled the Silla army with the armies of the defeated kingdoms Goguryeo and Baekje in a coalition against the Tang army. He had the unenviable challenge of freeing his country and hard-won conquests (particularly the entirety of what was formerly Baekje and some of the southern portions of what was formerly Goguryeo) from Tang domination. To achieve this, Munmu forged alliances with Goguryeo resistance leaders such as Geom Mojam and Anseung, and launched attacks on the Tang forces occupying territories formerly belonging to the conquered kingdoms of Baekje and Goguryeo. Starting almost immediately after the fall of Goguryeo in 668 AD and the establishment of the office of Protectorate General to Pacify the East, the struggle between the former allies lasted through much of the 670s AD.

Notable events
By 674, Tang and Silla were in frequent battle, as King Munmu had taken over much of the former territories of Baekje and Goguryeo from the Tang forces that had occupied these lands following the Goguryeo-Tang War and Baekje–Tang War, and fostered native resistance against the Tang in those territories of the other Korean kingdoms still occupied by the Tang. In this year, Emperor Gaozong, in anger, arbitrarily declared King Munmu's brother Kim Inmun (김인문, 金仁問) to be the king of Silla and commissioned Liu Rengui with an army to attack Silla. However, before any major battles could be fought, King Munmu, for unknown reasons (perhaps unwilling to deal with the potential divisions that could be caused by having a royal pretender loose in his kingdom and unprepared to fight the Tang), formally apologized and offered tribute; this satisfied Emperor Gaozong (he and King Munmu's father, King Muyeol, were actually friends before Gaozong became emperor, and it has been suggested that this relationship not only enabled Gaozong to help King Muyeol start the wars of Korean unification in 660 AD in spite of having active enemies elsewhere, but also caused Gaozong to view Silla in a non-antagonistic manner), and, not wanting to prolong the campaign, he ordered a withdrawal and recalled Kim Inmun.

In 675, Li Jinxing (李謹行) reached Sillan territory via land, using Mohe forces in Manchuria that had submitted to Tang, with the intent of occupying territory in Silla. However, the Tang forces were defeated by a Sillan army at the Maeso fortress, in or near present-day Yeoncheon.

In 676, Xue Rengui crossed the Yellow Sea to fight against Silla. However, a Sillan fleet expelled Tang forces off the coast of western Silla. It is possible that this defeat was the motivation for Emperor Gaozong's decision to depose and exile Xue Rengui that year (it is suggested that the exile occurred in 675 AD, i.e. the previous year, but it does not make sense that he could have been exiled prior to commanding the Tang forces in this engagement; records indicate that he returned from exile and was reinstated as a general in 681 AD).

Aftermath
Afterwards in 676, the Tang government moved the Protectorate General to Pacify the East to Liaodong. Although the Tang forces lost the conquered territories south of Taedong River, Silla could not regain the former Goguryeo territories to the north of Taedong River, which had fallen into Tang dominion. The Tang empire had taken control of Liaodong Peninsula, while Silla controlled the Korean Peninsula. Relations between Tang and Silla ceased until early 8th century. Following a revolt of the Eastern Turks in 679 AD, Emperor Gaozong abandoned his plans to invade the Korean Peninsula.

Despite having been enemies of the Tang, a number of officials and commanders of Goguryeo were admitted into the administration and military of the Tang (such as the brothers Yeon Namsaeng and Yeon Namsan, the sons of the late Yeon Gaesomun). Such leaders and officials, as well as their descendants, were assimilated into the Tang leadership and provided the dynasty with some capable generals and administrators.

Having been completely ejected from the Korean Peninsula, the next time Chinese forces would again enter Korea in force was during the Ming Dynasty, nearly a thousand years later, to aid the ruling Joseon Dynasty of Korea in resisting the Japanese invasions of Korea from 1592-1598.

After this conflict, subsequent Korean states (including the administration of Unified Silla) would choose a path of cooperation with the much larger and intimidating ruling Chinese dynasties in order to guarantee their independence and avoid invasions of conquest from China. This strategy proved successful in avoiding assimilation by Chinese powers.