The Sixteen Prefectures, more precisely known as the Sixteen Prefectures of Yan–Yun () or the Sixteen Prefectures of You–Ji (), were a historical region in North China that comprises present-day municipalities of Beijing, Tianjin and parts of northern Hebei and Shanxi provinces north of the Hai River and its two northern tributaries Sanggan and Juma rivers. The region's name came from the sixteen military district prefectures (zhou) of the Tang dynasty's northeastern borderlands under the fanzhen administration of the Youzhou and Hedong jiedushi, whose administrative seats were in Yan Prefecture and Yun Prefecture, respectively.

Situated around the Great Wall within the Yan Mountains and Heng Mountain, the Sixteen Prefectures were a strategically important gateway region into the Central Plains and shielded the North China Plain from Hu incursions from the northeast, north and northwest, reinforced by riverine logistic transport of the Grand Canal.

During the Five Dynasties and Ten Kingdoms period, the region was ceded to the Khitan-led Liao dynasty in 938 AD by Shi Jingtang, who desperately sought Liao aid in his rebellion against his brother-in-law, the Later Tang emperor Li Congke. This cession subsequently caused various Central Plains dynasties to the region's south (including the Shatuo-led Later Jin dynasty founded by Shi Jingtang himself) to become vulnerable against invaders from the north (who used the region as a strategic staging area), as there were no longer any significant natural barriers north of the Yellow River capable of halting large-scale cavalry incursions. The region was marred by constant military conflicts for the next three centuries, both by the Central Plains regimes (such as the Later Zhou and the Northern Song dynasties) attempting to recapture the region and by new northern invaders (such as the Jurchen-led Jin dynasty and later the Mongol-led Yuan dynasty) against the old occupiers (the Liao and Jin dynasties, respectively), until the Mongol Empire conquered northern China in 1234 AD. After the Yuan dynasty, the region came under the control of the subsequent Ming and Qing dynasties.

Overview After the Tang dynasty collapsed, the Sixteen Prefectures became a site of contention between various ethnicities of North China, including Han, Khitan, Jurchen, and Mongol.

In 938 AD, the prefectures were ceded to the Khitans by Shi Jingtang of the Shatuo-led Later Jin, who submitted to Khitan emperor Yelü Deguang as the latter's "son-emperor" (despite the latter being almost 11 years younger) in exchange of military support in his rebellion against his estranged brother-in-law, Emperor Li Conghou of Later Tang. While Shi succeeded in overthrowing Later Tang, his shameless treason not only fully exposed North China to Khitan invasions and looting, but also doomed his own regime, which were invaded and destroyed by the Khitans nine years later when Yelü Deguang's Liao dynasty defeated and exiled Shi's successor and nephew Shi Chonggui in 947 AD. The Khitan's victory were however short-lived when Yelü Deguang grew tired of constant Chinese insurgencies and decided to withdraw but died of illness on his way back, and the territories newly conquered by the Khitans were quickly recovered by the Later Han. After the Later Han was overthrown by the Later Zhou, Zhou second emperor Chai Rong attempted to recapture the Sixteen Prefectures with a northern expedition in 959 AD, nearly succeeding until the campaign had to be abandoned due to Chai suddenly falling ill and died within a month.

After Later Zhou general Zhao Kuangyin usurped the throne from Chai Rong's 7-year-old son Chai Zongxun with a mutiny at Chenqiao and established the Song dynasty in 960 AD, he chose to deal with other rival states in the south and west first instead of recovering the Sixteen Prefectures, despite that the Liao dynasty had already the been weakened by a decade of internal conflicts and political chaos. However, when his brother and successor Zhao Guangyi finally decided to launch northern expeditions to recapture the Sixteen Prefectures in 979 AD, the Liao dynasty had recovered its strength and decisively defeated the Song dynasty twice in 979 AD and 986 AD. After the failure of a Liao invasion in 1003 AD, the Chanyuan Treaty was signed in 1005 AD, which practically eliminated any possibilities for the Song dynasty to recapture the Sixteen Prefectures from the Khitans.

In 1120s, two principal cities, Youzhou (also called Yanzhou, modern Beijing) and Yunzhou (modern Datong, Shanxi) were taken away from the Liao when the Jurchen-led Jin dynasty conquered the region. In 1123, the Jin ceded most of the territories except Yunzhou to the Song, but retook them in an invasion of Song territory in 1125. The Song dynasty then collapsed two years later in the Jingkang incident in 1127, and the surviving royal court fled south of the Huai River to establish a rump state known as the Southern Song dynasty.

The loss of the Sixteen Prefectures again exposed the plains of Central China to northern threats when the Mongol Empire rose in the 13th century. The Mongols, under Ögedei Khan, would conquer the Jin dynasty in 1232, completing the conquest of all of northern China. The Southern Song dynasty would be conquered by Kublai Khan's Yuan dynasty in 1279.

In 1368, Hongwu Emperor of the Ming dynasty ordered general Xu Da and Chang Yuchun to call for the restoration of Han rule. They sent a Northern Expedition to Zhongyuan, overthrowing the Yuan's rule in China proper and establishing Ming. The Sixteen Prefectures were then restored to Han rule.

Tang dynasty political geography The Sixteen Prefectures were administrative units established during the Tang dynasty. Under the Tang, each prefecture or zhou was a unit of administration larger than a county but smaller than a province. The Sixteen Prefectures stretched from Ji County in modern-day Tianjin Municipality to Datong in Shanxi Province, extending contiguously along the mountains that divide the agrarian plains of central China from the pastoralist steppes to the north. Several dynasties including the Qin and the Northern Dynasties before the Tang built the Great Wall along these mountains. Seven of the Sixteen Prefectures were located inside (south) of the Inner Great Wall. The other eleven were located in between the Inner and Outer Great Walls. The Tang did not build Great Walls but used frontier military commanders to guard against the northern tribes. The Fanyang or Youzhou-Jizhou Commandery, based in modern-day Beijing commanded 11 of the Sixteen Prefectures. The other seven were commanded by the Hedong Commandery based in Yunzhou, modern Datong.

Prefecture Chinese characters Modern location Modern province/municipality Administrator during the Tang Proximity to the Great Wall 1Youzhou(Yanzhou)幽州(燕州) Xicheng District Beijing Youzhou-Jizhouinside 2Shunzhou順州Shunyi District Beijing Youzhou-Jizhouinside 3Tanzhou檀州 Miyun District Beijing Youzhou-Jizhouinside 4Ruzhou儒州Yanqing DistrictBeijingYouzhou-Jizhouin between 5Jizhou薊州Jizhou District, TianjinTianjinYouzhou-Jizhouinside 6Yingzhou瀛州Hejian HebeiYouzhou-Jizhouinside 7Mozhou莫州Renqiu HebeiYouzhou-Jizhouinside 8Zhuozhou涿州Zhuozhou HebeiYouzhou-Jizhouinside 9Xinzhou新州Zhuolu HebeiYouzhou-Jizhouin between 10Guizhou嬀州Huailai HebeiYouzhou-Jizhouin between 11Wuzhou武州Xuanhua HebeiYouzhou-Jizhouin between 12Yuzhou蔚州Yu County HebeiHedongin between 13Yunzhou雲州Datong ShanxiHedongin between 14Yīngzhou應州Ying County ShanxiHedongin between 15Huanzhou寰州East of Shuozhou ShanxiHedongin between 16Shuozhou朔州Shuozhou ShanxiHedongin between

The historian Frederick W. Mote writes that there were actually 19 prefectures but does not specify them. Chinese historians do not consider Yingzhou (營州; modern Qian'an, Hebei) and Pingzhou (平州; modern Lulong, Hebei) to be part of the Sixteen Prefectures because they had already been occupied by the Liao dynasty during the Later Tang, prior to Shi Jingtang’s cession.(Chinese) 李榮村, "燕雲十六州" 中華百科全書‧典藏版1983 ed. Yizhou (易州; modern Yi County, Hebei), which fell to the Liao after the cession, is also excluded from the count of 16.(Chinese) "'幽雲'、'燕雲' 兩不同" The Liao created two new prefectures, Jingzhou (景州; modern Zunhua, Hebei) from Jizhou and Luanzhou (灤州; Luan County, Hebei) from Pingzhou, which have not been included in the original 16.

Five Dynasties and Ten Kingdoms period

The year 907 and subsequent collapse of the Tang dynasty was a turning point in East Asian history.: "Zhu Wen's usurpation of Tang state power in 907, and Abaoji's takeover of Khitan leadership in 907, each marking significant realignments of power, changed the shape of East Asian history." On that year the pastoral and nomadic people known as the Khitan crowned Yelü Abaoji (Emperor Taizu of Liao) as their new Great Khan, the first from the Yelü tribe after some two centuries of leadership by the Yaonian clan., pp. 32 (on Khitan's nomadic lifestyle) and 37–38 (for the rise of Abaoji, his title of Great Khan, and his tribal affiliation). Abaoji coveted the plains of North China, a rich source of plunder that was guarded by a line of passes and fortifications stretching from mountainous northern Shanxi to the Bo Sea.. In 905 Abaoji had already started to intervene in northern China by leading a massive army to Datong in Shanxi to swear brotherhood with Li Keyong who nominally served the severely weakened Tang dynasty as Jiedushi of Shanxi on the westernmost point of the defense line.

The rise of Khitan power under Abaoji occurred just as the Central Plains were falling into turmoil. The fall of the Tang dynasty in 907 led to power struggles among rival warlords and to the creation of a number of short-lived polities known as the Five Dynasties. The first of these dynasties was founded by Zhu Wen, another Jiedushi, who declared himself emperor of the Later Liang in 907 after deposing the last Tang emperor.. In 923 his dynasty was overthrown by Li Keyong's son, Li Cunxu, who then proclaimed the Later Tang..

The Sixteen Prefectures passed into Liao hands in 938, when the Liao dynasty supported Shi Jingtang, another military governor of Shanxi, in his revolt against the Later Tang.. Confident in his own military strength, the Liao emperor, Abaoji's second son Yelü Deguang (Emperor Taizong of Liao), convinced Shi to found a new dynasty (the Later Jin), but also to cede a large band of territory to the Liao that represented the entire northern China defense line... The Liao dynasty now possessed all the passes and fortifications that controlled access to the northern China plains.

Liao rule

The Khitan-led Liao dynasty kept using Chinese administrative forms to administer the counties and prefectures they had captured.. They named Datong (on the western end of the Sixteen Prefectures) their Western Capital, and in 938 built a new fortified city at Youzhou (near modern-day Beijing), which they turned into their Southern Capital. Under Liao rule, the Sixteen Prefectures thus represented two of the Liao dynasty's five divisions. Both sections were part of the Southern Chancellery, one of two broader divisions the Liao dynasty had been divided into. The Sixteen Prefectures had become the springboard from which the Liao dynasty would exert its influence on northern China.