Shanghai was formally opened to foreign trade on November 17, 1843. When the first party of English traders arrived, they saw the future International Settlement -- a strip of land to the north of the Chinese city bordering the riverine area where Suzhou Creek ran into the Huangpu before entering the sea -- "in the shape of sundry reed-beds, swamps, ponds and other malarious constituents." These Englishmen were soon joined by an ever increasing number of Western traders and missionaries, of whom many were French and American. After the turn of the century other foreign sojourners arrived: Japanese, White Russians, Indians, Vietnamese, Prussians, Portuguese, Italians, Spanish, Poles, Greeks, and so forth. Shanghai's foreign community in its heyday was said to represent no fewer than fifty-eight nationalities. But the size of this foreign community never seemed to have exceeded a total of 150,000 people.
The tenfold increase of Shanghai's population between 1842 and 1945 was largely a result of Chinese immigration from the countryside into the city, especially into the International Settlement (which doubled in numbers between 1895 and 1910 and doubled again between 1910 and 1930) and the French Concession (which almost tripled between 1895 and 1915 and more than tripled again between 1915 and 1930). From the 1850s on, each new social disturbance in the interior sent tens of thousands of Chinese refugees to Shanghai, seeking protection under the English and French flags. In the late 1850s the rebel troops of the Kingdom of Heavenly Peace (the Taipings), which ravaged eighteen provinces in fourteen years (1850-1864), swept through the lower Yangzi Valley, capturing such major cities as Nanjing, Suzhou, and Hangzhou.