The Nánjīng area has been inhabited for about 5000 years, and a number of prehistoric sites have been discovered in or around the city. Recorded history, however, begins in the Warring States period (453–221 BC), when Nánjīng emerged as a strategic object of conflict. The arrival of a victorious Qin dynasty (221–207 BC) put an end to this, allowing Nánjīng to prosper as a major administrative centre.
The city’s fortunes took a turn for the worse in the 6th century when it was successively rocked by floods, fires, peasant rebellions and military conquest. With the advent of the Sui dynasty (AD 589–618) and the establishment of Xī‘ān as imperial capital, Nánjīng was razed and its historical heritage reduced to ruins. Although it enjoyed a period of prosperity under the long-lived Tang dynasty, it gradually slipped into obscurity.
In 1356, a peasant rebellion led by Zhu Yuanzhang against the Mongol Yuan dynasty was successful. The peasants captured Nánjīng and 12 years later claimed the Yuan capital, Běijīng. Zhu Yuanzhang took the name of Hongwu and became the first emperor of the Ming dynasty, with Nánjīng as his capital. A massive palace was built and walls were erected around the city.
Nánjīng’s glory as imperial capital was short-lived. In 1420, the third Ming emperor, Yongle, moved the capital back to Běijīng. From then on, Nánjīng’s fortunes variously rose and declined as a regional centre, but it wasn’t until the 19th and 20th centuries that the city again entered the centre stage of Chinese history.
In the 19th century, the Opium Wars brought the British to Nánjīng and it was here that the first of the ‘unequal treaties’ were signed, opening several Chinese ports to foreign trade, forcing China to pay a huge war indemnity, and officially ceding the island of Hong Kong to Britain. Just a few years later, Nánjīng became the Taiping capital during the Taiping Rebellion, which succeeded in taking over most of southern China.
In 1864 the combined forces of the Qing army, British army and various European and US mercenaries surrounded the city. They laid siege for seven months, before finally capturing it and slaughtering the Taiping defenders.
During the 20th century, Nánjīng was the capital of the Republic of China, the site of the worst war atrocity in Japan’s assault on China, and the Kuomintang capital from the period of 1928 to 1937 and, again between 1945 and 1949, before the communists ‘liberated’ the city and made China their own.