Hangzhou is a major city located in the Yangtze River Delta region of the People's Republic of China, and the capital of Zhejiang (浙江) province. It is governed as a sub-provincial city, and as of 2004, its entire administrative division ("shì", 杭州市) or Prefecture-level city had a registered population of 6.4 million people. The Urban agglomeration of the Hangzhou metropolitan area (杭州市区) has a resident population of 3.9319 million as of 2003, of which 2.6367 million are permanent residents. There are 1.91 million residents in the six urban core districts. In addition to its economically potent position on the Hangzhou Bay 180 kilometres (112 mi) southwest of Shanghai, Hangzhou also has been one of the most renowned and prosperous cities of China for much of the last 1,000 years, due in part to its beautiful natural scenery, with the West Lake (Xī Hú, 西湖) as the most well-known location.
The celebrated Neolithic culture of Hemudu inhabited Yuyao, an area (now a city) 100 kilometers south-east of Hangzhou, as far back as seven thousand years ago when rice was first cultivated in southeastern China. The area immediately surrounding the modern city of Hangzhou was inhabited five thousand years ago by the Liangzhu culture, so named for the small town of Liangzhu not far to the northwest of Hangzhou where the ancient jade carving civilization was first discovered. The city of Hangzhou was founded about 2,200 years ago during the Qin Dynasty, but the city wall was not constructed until the Sui Dynasty (591). It is listed as one of the Seven Ancient Capitals of China. Hangzhou is at the southern end of China's Grand Canal which extends to Beijing. The canal evolved over centuries but reached its full length by 609.
Hangzhou was chosen as the new capital of the Southern Song Dynasty when they regrouped after their defeat at the hands of the Jin in 1123. It remained the capital from the early 12th century until the Mongol invasion of 1276, and was known as Lin'an (臨安). It served as the seat of the imperial government, a center of trade and entertainment, and the nexus of the main branches of the civil service. During that time, the city was a sort of gravitational center of Chinese civilization: what used to be considered "central China" in the north was taken by the Jin, an ethnic minority dynasty ruled by Jurchens. Numerous philosophers, politicians, and men of literature, including some of the most celebrated poets in Chinese history such as Su Shi (苏轼), Lu You (陆游), and Xin Qiji (辛弃疾) came here to live and die. Hangzhou is also the birthplace and final resting place of the scientist Shen Kuo (1031-1095 AD), his tomb being located in the Yuhang district.
During the Southern Song Dynasty, commercial expansion, an influx of refugees from the conquered north, and the growth of the official and military establishments, led to a corresponding population increase and the city developed well outside its 9th century ramparts. According to the Encyclopædia Britannica, Hangzhou had a population of over 2 million at that time, while historian Jacques Gernet has estimated that the population of Hangzhou numbered well over one million by 1276. (Official Chinese census figures from the year 1270 listed some 186,330 families in residence and probably failed to count non-residents and soldiers.) It is believed that Hangzhou was the largest city in the world from 1180 to 1315 and from 1348 to 1358.