Battle of Gaoliang River

The Battle of Gaoliang River (Chinese Simplified: 高梁河之战; Chinese Traditional: 高梁河之戰) was fought in 979 between the Liao dynasty and Northern Song dynasty in present-day Beijing. The Liao victory ended a Song campaign to recapture the Sixteen Prefectures in North China.

After founding the Song dynasty in 960, the Emperor Taizu of Song sought to capture the Sixteen Prefectures, which the Liao dynasty acquired in 936 from the Later Jin dynasty. His successor, the Emperor Taizong of Song, personally led a military expedition that reached Youzhou in 979, and laid siege to the city. The city's walls, some 16 km in length, withstood the siege for three months. Defenders were bolstered by Liao reinforcements who were able burrow under the Song siege and into the city itself. A large Liao reinforcement arrived and defeated the Song Army north of Youzhou, just west of Xizhimen, in present-day Beijing.

More than 160 years after this defeat, the Song briefly took control of modern-day Beijing in 1123 when the Song–Jin alliance defeated the Liao and the city was ceded by the Jin dynasty to the Song. However, two years later, the Jin invaded the Song and retook Yanshan.