original_query: When were the first treaty ports established in China by the British?
query: When were the first treaty ports established in China by the British?
answer: The British established their first treaty ports in China in 1842 after the First Opium War, as per the Treaty of Nanking.