The Treaty of Nanking (or Nanjing) was signed on 29 August 1842 to mark the end of the First Opium War (1839–42) between the United Kingdom of Great Britain and Ireland and the Qing Dynasty of China. It was the first of what the Chinese called the unequal treaties because Britain had no obligations in return.