Shanghai (ʃæŋˈhaɪ; , zɑ̃̀.hɛ́zh-wuu-2-上海.ogg, Standard Mandarin pronunciation: AUDZh-Shanghai.oggshang4.hai3) is one of the four direct-administered municipalities of the People's Republic of China (PRC). The city is located on the southern estuary of the Yangtze River, with the Huangpu River flowing through it. The population of the city proper is the third most populous in the world, with 24.89 million inhabitants in 2021, while the urban area is the most populous in China, with 39,300,000 residents. As of 2018, the Greater Shanghai metropolitan area was estimated to produce a gross metropolitan product (nominal) of nearly 9.1 trillion RMB ($1.33 trillion). Shanghai is one of the world's major centers for finance, business and economics, research, science and technology, manufacturing, transportation, tourism, and culture, and the Port of Shanghai is the world's busiest container port.
Originally a fishing village and market town, Shanghai grew in importance in the 19th century due to both domestic and foreign trade and its favorable port location. The city was one of five treaty ports forced to open to European trade after the First Opium War. The Shanghai International Settlement and the French Concession were subsequently established. The city then flourished, becoming a primary commercial and financial hub of Asia in the 1930s. During the Second Sino-Japanese War, the city was the site of the major Battle of Shanghai. After the war, with the CCP takeover of the mainland in 1949, trade was limited to other socialist countries and the city's global influence declined.
By the 1990s, economic reforms introduced by Deng Xiaoping a decade earlier resulted in an intense redevelopment of the city, especially the Pudong New Area, aiding the return of finance and foreign investment. The city has since re-emerged as a hub for international trade and finance; it is the home of the Shanghai Stock Exchange, one of the largest stock exchanges in the world by market capitalization and the Shanghai Free-Trade Zone, the first free-trade zone in mainland China.