In the treaty of nanjing that ended the first opium war in 1842, Britain made China pay a huge indemnity (payment for losses in the war) Britain also gained Hong Kong; the treaty of Nanjing is the treaty which marked the end of the first Opium war and would have a lasting effect on East -west relations.