Pingyao is a county in central Shanxi province, People's Republic of China. It lies about 715 kilometres (444 mi) from Beijing and 80 kilometres (50 mi) from the provincial capital, Taiyuan. During the Qing Dynasty, Pingyao was a financial center of China. Its history dates back 2,700 years, and is one of the best preserved ancient cities in the known world. It is still inhabited by 50,000 residents and is renowned for its well-preserved ancient city wall, and is a UNESCO World Heritage Site.
Pingyao still retains its city layout from the Ming and Qing dynasties, conforming to a typical bagua 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. During the Han Dynasty, it was known as Zhongdu county. In 1986, the People's Republic of 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 meters high, with a perimeter of 6,000 meters. A 4-meter wide, 4-meter 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 centerpiece of the Heritage Site.
Pingyao was the financial center 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.