|For other uses, see Shanghai (disambiguation)|
|Behind the scenes|
- "What ports of call on your voyage to China, Mister de Ver?"
"Marseilles, mon capitan. Where the best ships, the ships built by Frenchmen, they are docking! Also, Lisbon, Gibraltar, Algol here in Afrique, then around the Cape of Good Hope to Shanghai. With stops for provisioning, naturellement."
- ―Jack Sparrow and Etienne de Ver[src]
- "I hate that insipid Mistress Ching. There was a wondrous selection of tea and spices coming to me from Shanghai and she co-opted it."
- ―Barbara Huntington to Benedict Huntington[src]
During the Song Dynasty (AD 960–1279) Shanghai was upgraded in status from a village to a market town in 1074, and in 1172 a second sea wall was built to stabilise the ocean coastline, supplementing an earlier dike. From the Yuan Dynasty in 1292 until Shanghai officially became a city for the first time in 1297, the area was designated merely as a county administered by the Songjiang prefecture.
Two important events helped promote Shanghai's development in the Ming Dynasty. A city wall was built for the first time in 1554, in order to protect the town from raids by Japanese pirates. It measured 10 metres high and 5 kilometers in circumference.
During the Qing Dynasty, Shanghai became one of the most important sea ports in the Yangtze Delta region. In 1732 Emperor Yongzheng moved the customs office for Jiangsu province from the prefectural capital of Songjiang city to Shanghai, and gave Shanghai exclusive control over customs collections for Jiangsu Province's foreign trade. Colonial buildings in old Shanghai.
By 1735 Shanghai had become the major trade port for all of the lower Yangtze River region, despite still being at the lowest administrative level in the political hierarchy. In the 1740s, Shanghai was the headquarter of the Pirate Confederation of China, led by Mistress Ching.
- The Price of Freedom (Mentioned only)
- Legends of the Brethren Court: Rising in the East (First appearance)
- Pirates of the Caribbean Online (Mentioned only)