 During China's Northern and Southern Dynasties Period, Eastern Wei had the commandery seat at Daixian in what is now Shanxi.During the 540s, the district is recorded having 30,434 people living in 6,328 households.Under the Sui, Yanmen Commandery was abolished in 583, then revived in 607.