Shanghai became a busy seaport from the time of the Song Dynasty. A city wall was built in 1553, which is generally accepted as the start of the city of Shanghai. During the Qianlong era of the Qing Dynasty, Shanghai became an important regional port for the Yangtze and Huangpu rivers. It also became a major seaport for the nearby Jiangsu and Zhejiang provinces. The importance of Shanghai grew radically in the 19th century, as the city's strategic position at the mouth of the Yangtze River made it an ideal location for trade with the west.
During the First Opium War in the early 19th century, British forces temporarily held Shanghai. The war ended with the 1842 Treaty of Nanjing, which saw the treaty ports, Shanghai included, opened for international trade.
During the First Opium War in the early 19th century, British forces temporarily held Shanghai. The war ended with the 1842 Treaty of Nanjing, which saw the treaty ports, Shanghai included, opened for international trade.