Thousands of years ago, much of the Zhongshan area lay within the Pearl River estuary, with only scattered islands above the surface. Gradually from south to north, the area filled in with alluvial silt and became dry land. The northern parts of today's Zhongshan did not fill in until the time of the
Ming dynasty. The Zhongshan area was part of an extended
Dongguan County during the
Tang dynasty (618–907 AD), and was a significant
sea salt producer. In 1082, during the
Northern Song dynasty, a fortified settlement called Xiangshan was founded in the area, marking the first official use of the name by which it would be known throughout most of its modern history. The prosperous settlement was then upgraded to a county in 1152. After the collapse of the
Southern Song dynasty, many descendants of Song court officials, including members of the imperial family, settled in Xiangshan. Significant land formation in the area of Zhongshan occurred since the
Ming dynasty. Under the
Qing dynasty, embankments were built to prevent flooding in the new alluvial lands, and the area of cultivation was extended. Much of the
First Opium War took place in and around Xiangshan. In 1839, the official
Lin Zexu arrived in Xiangshan and ordered the expulsion of
Sir Charles Elliot and other British traders from the area.
Qing dynasty soldiers resisted British attacks on the area in 1840, but were ultimately overwhelmed. After the Opium Wars opened the region to foreign influence, a number of Xiangshan residents, including
Sun Zhongshan (Yatsen), left to study overseas and were among the creators of modern China. Xiangshan was one of the first counties in China liberated as part of the
Xinhai Revolution. After Sun Zhongshan's death in 1925, the commander-in-chief of the armed forces of the
Republic of China decided to memorialize Sun by renaming his county of birth from Xiangshan to Zhongshan.
Nationalist and
Communist units launched guerrilla attacks on Japanese occupancy forces and their
Collaborators beginning in 1942. On August 15, 1945, Japanese forces declared an unconditional surrender, and Zhongshan was liberated. Zhongshan was the scene of fighting during the
Chinese Civil War and was held for much of the war by Nationalists. On October 30, 1949, however, the
People's Liberation Army defeated Nationalist forces in Zhongshan, and the county came under the control of the People's Republic of China. In 1983, Zhongshan was elevated in administrative status from a county to a
county-level city under the administration of
Foshan. In 1988 Zhongshan became a
prefecture-level city. ==Geography==