Southeast corner of the city wall. Pingyao, Shanxi Pingyao was first enclosed by walls in 1370, part of the Ming program of fortifying cities and towns across the empire in order to secure them against invasion or revolt. The walled circuit of Pingyao, one of few remaining in China today, is square in form, oriented to the compass, and measures about 1.5km on a side. The wall is surrounded by a moat, and pierced by barbican gates, from which issue the town's main streets: one running N-S, and two running E-W. A river flowing along the south wall supplied water to the city. The walls were constructed of pounded earth faced with brick; they average 9-12m wide at the base, and 6-10m in height. A paved walkway runs along the top of the wall, which is defended by battlements, bastions, barracks, and towers.