The name Shanghai dates from the Sung dynasty (11th cent.), but the town, which became a walled city in the 16th cent., was unimportant until it was opened to foreign trade by the Treaty of Nanjing in 1842. The ensuing Western influence launched the city on its phenomenal growth. The greater part of the city was incorporated into the British concession (1843), just north of the old walled city, and into the U.S. concession of Hongkew (1862). In 1863 the United States and Great Britain consolidated into the International Settlement the areas that had been conceded to them. The French, who had obtained a concession in 1849, continued it as a separate entity. The foreign zones, which were under extraterritorial administration, maintained their own courts, police system, and armed forces. Thus Shanghai until World War II was a divided city.
In 1927, Chiang Kai-shek, at the head of the Nationalist army and with the support of the Chinese Communists, captured Shanghai. The Chinese section was immediately placed under the Kuomintang government. Japan invaded and attacked the Chinese city in 1932 to force the government to break an unofficial boycott of Japanese goods. In Aug., 1937, as part of the Second Sino-Japanese War, the Japanese again attacked the Chinese city, and resistance was overcome in November. The foreign zones were occupied by the Japanese after Dec. 7, 1941.
In 1943 the United States and Great Britain renounced their claims in Shanghai, as did France in 1946. The city was restored to China at the end of World War II, and the Chinese central government for the first time gained control of the entire city. In May, 1949, it fell to the Communist forces. Since Pudong was declared (1990) a special development zone, government and foreign investment has revived Shanghai as an international trade and financial center. An international exposition was held in the city in 2010.