Under the terms of the Treaty of Nanking, signed in 1843, Ningbo became one of the five Chinese treaty ports opened to virtually unrestricted foreign trade.