 In 446, 100,000 men were put to work building an inner wall from Yanqing, passing south of the Wei capital Pingcheng, and ending up near Pingguan on the eastern bank of the Yellow River.The two walls of Northern Wei formed the basis of the double-layered Xuanfu–Datong wall system that protected Beijing a thousand years later during the Ming dynasty.The heavy Chinese influence that had come into the Northern Wei state which went on throughout the 5th century had mainly affected the courts and the upper ranks of the Tuoba aristocracy.