Hong Kong was under British rule from 1841 to 1997, except for a brief period of Japanese occupation during the Second World War from 1941 to 1945. It was a Crown colony of the United Kingdom from 1841 to 1981, and a dependent territory from 1981 to 1997. The colonial period began with the British occupation of Hong Kong Island under the Convention of Chuenpi in 1841 of the Victorian era, and ended with the handover of Hong Kong in July 1997.
In accordance with Article III of the Treaty of Nanking of 1842, signed in the aftermath of the First Opium War, the island of Hong Kong was ceded in perpetuity to Great Britain. It was established as a Crown colony in 1843.