The Nanjing Treaty, signed in 1842, officially ended the First Opium War between Great Britain and the Qing Dynasty. It forced China to open Treaty Ports for foreign trade and ceded Hong Kong Island to British control, marking the beginning of an era of unequal treaties.