Somewhere near where Xizhimen subway station now funnels commuters through western Beijing, an emperor's ambitions died on the banks of a river. In 979, Emperor Taizong of the Northern Song dynasty rode north at the head of his army, determined to recapture the Sixteen Prefectures -- a strategically vital strip of northern territory, including what is now Beijing, that had been in Liao dynasty hands since 936. He laid siege to the walled city of Youzhou, the Liao stronghold on the site of modern Beijing. Three months later, his army was destroyed just west of the walls, and the Song would not control this ground for another 144 years.
The Sixteen Prefectures had haunted Chinese rulers since 936, when the Later Jin dynasty ceded them to the Khitan Liao in exchange for military support during a succession struggle. The territory included critical mountain passes and fortified cities along the northern frontier -- natural defenses that, in Liao hands, left the North China Plain exposed to cavalry raids. Emperor Taizu, founder of the Song dynasty in 960, had recognized recapturing the prefectures as essential to securing his new state, but died before mounting a campaign. His younger brother and successor, Taizong, inherited both the throne and the strategic obsession.
Taizong arrived at Youzhou in 979, fresh from a successful campaign against the Northern Han state in Shanxi. Confidence ran high. But Youzhou was no easy target. The city's walls stretched roughly 16 kilometers in circumference, and the Liao garrison proved resourceful. For three months the Song army battered the defenses without breaking through. Making matters worse, Liao reinforcements managed to tunnel beneath the Song siege lines and enter the city, bolstering the defenders from within. The Song emperor was committing the cardinal sin of siege warfare: he was losing time, and time favored the defenders.
The end came swiftly. A large Liao relief force arrived from the north and struck the Song army on the Gaoliang River, just west of Xizhimen in present-day Beijing. The Song forces, exhausted from months of siege and caught between the city garrison and the relief army, collapsed. Emperor Taizong himself narrowly escaped the rout, reportedly fleeing in a donkey cart. The decisive Liao victory ended any Song hope of reclaiming the Sixteen Prefectures by force. The defeat shaped the next century of Chinese foreign policy, pushing the Song toward diplomacy and tribute payments rather than military confrontation with its northern neighbors.
More than 160 years would pass before the Song briefly held Beijing again, and even then the possession proved fleeting. In 1123, a Song-Jin alliance defeated the Liao dynasty, and the city was ceded to the Song by their Jin allies. But the alliance fractured almost immediately. Within two years, the Jin invaded Song territory, recaptured the city they now called Yanjing, and drove deep into China, eventually seizing the Song capital of Kaifeng in the catastrophic Jingkang Incident of 1127. The Gaoliang River defeat of 979 had been an early signal of a pattern that would define medieval Chinese history: northern nomadic states repeatedly proving stronger than the wealthy but militarily vulnerable Song, which controlled China's economic heartland but could never secure its northern frontier.
The battle occurred near present-day Xizhimen in western Beijing, approximately 39.94°N, 116.36°E. The Gaoliang River no longer exists as a visible waterway in this area, having been absorbed into Beijing's urban infrastructure. The general area is near the northwest corner of the 2nd Ring Road. Beijing Capital International Airport (ZBAA/PEK) is 15 nm to the northeast. Best viewed at 3,000-5,000 feet AGL.