居庸関
In 446, the Northern Wei built a Great Wall from Juyong Pass west to Shanxi to protect its capital, Datong, from the Rouran. In 553–56, the Northern Qi extended this Great Wall eastward to the Bohai Sea to defend against the Göktürks, who raided Youzhou in 564 and 578. Centuries of warfare severely depopulated northern China. During the Eastern Wei (534–550), Youzhou, Anzhou (modern Miyun) and East Yanzhou (modern Changping) had a combined 4,600 households and about 170,000 residents.