The treaty port system was a network of ports in China that were opened to foreign trade and residence as a result of various unequal treaties during the 19th century, most notably after the Treaty of Nanjing in 1842. This system allowed foreign powers to establish commercial footholds in China, leading to significant economic and social changes while undermining Chinese sovereignty. The treaty ports became crucial centers for foreign influence and commerce, marking the beginning of a new era in China's interactions with the West.