Pingyao is a county in central Shanxi province in China. It is located approximately 715 kilometres southwest of Beijing and 80 kilometres from the provincial capital, Taiyuan. During the Qing Dynasty, Pingyao was a financial centre of China. The ancient city, whose history dates back some 2,700 years and which is renowned for its well-preserved city walls, is a UNESCO World Heritage Site and a major tourist attraction. It is still inhabited by some 50,000 residents.
Pingyao still retains its city layout from the Ming and Qing dynasties, conforming to a typical Ba gua pattern. More than 300 sites in or near the city have ancient ruins. Preserved Ming- and Qing-style residences number close to 4,000. The streets and storefronts still largely retain their historical appearance.
In the Spring and Autumn Period, the county belonged to the kingdom of Jin. It was part of the kingdom of Zhao in the Warring States period. In the Qin Dynasty, it was known as Pingtao. During the Han Dynasty, it was known as Zhongdu county. In 1986, the China designated Pingyao as one of the Chinese Historic and Cultural Cities. It became a World Heritage Site in 1997, including the outlying Zhenguo Temple and Shuanglin Temple.
The city walls of Pingyao were constructed in the 3rd year of the Hongwu Emperor (1370). The walls have six barbican gates. The north and south sides have one gate each. The east and west sides have two gates each. This pattern is similar to that of a turtle (the head, tail and four legs), earning Pingyao the moniker "Turtle City." The walls measure about 12 metres high, with a perimeter of 6,000 metres. A 4-metre wide, 4-metre deep moat can be found just outside the walls. Aside from the four structured towers at the four corners, there are also 72 watchtowers and more than 3,000 battlements. In 2004, part of the southern walls collapsed but were reconstructed. However, the rest of the city walls are still largely intact and are considered among the best-preserved ancient city walls on this scale. This makes the city walls the centrepiece of the Heritage Site.
Pingyao was the financial centre of China in the late Qing Dynasty. During those times, there were as many as 20 financial institutions within the city, comprising more than half of total in the whole country. Among these is "Rishengchang," considered the first bank in China. Rishengchang controlled almost 50% silver trade when its scale reached the top in the whole Qing Dynasty. It continued to maintain its prosperity until going bankrupt in 1914 because lots of the modern banks were built up. The 2009 film Empire of Silver depicted the tribulations of a Shanxi bank-owning family that lived in Pingyao during the early 20th century.