a war between Great Britain and China that began in 1839 as a conflict over the opium trade and ended in 1842 with the Chinese cession of Hong Kong to the British, the opening of five Chinese ports to foreign merchants, and the grant of other commercial and diplomatic privileges in the Treaty of Nanking.