Among the Three Treasures of Pingyao, which includes the Pingyao Ancient City Wall, Zhengguo Temple, and Shuanglin Temple, it is the City Wall that rates the highest among locals and visitors alike. The city was laid out according to Feng Shui tradition, which says that the most auspicious city layout is where the mountains and water face the sun and a tortoise can be found playing in the water.
Pingyao's original name was Pingtao, and it was built in the early Northern Wei Dynasty. In 424, its name was changed to Pingyao. Pingyao was repaired during the Western Zhou Dynasty (827-728 B.C) when General Yin Jipu stationed his troops here to prevent a barbarian invasion. The original walls were of packed earth and were located northwest of the present city. The walls were rebuilt and lengthened from 9 li plus eighteen paces that totaled over 12 li (6.4 kilometers). Starting in 1370, stones and bricks were added to the outside, and the wall continued to undergo frequent repairs and rebuilding during the Ming and Qing Dynasties.
Today the wall stands ten meters high, measures 6,163 meters around, and is three to five meters wide at the top. While the west, north, and east walls are straight, the south one curves, forming a rough square. The north and south walls each have one gate, while the east and west walls each have two. Each gate has a barbican entrance that includes an inner and outer door with a tower above it. Three of these have been rebuilt. Each gate used to have a drawbridge that was needed to cross the moat, which today is still located on three sides of the city and is more than 3.3 meters deep and 3.3 meters wide. Scholar trees and willows formerly lined the moat.
