 Gradually, the port of Shanghai surpassed Ningbo and Guangzhou to become the largest port in China.In 1842, Shanghai became a treaty port, thus developing into an international commercial city.By the early 20th century, it was the largest city and the largest port in East Asia.