British Hong Kong was a colony and dependent territory of the British Empire from 1841 to 1997, apart from a brief period under Japanese occupation from 1941 to 1945. The colonial period began with the occupation of Hong Kong Island in 1841 during the First Opium War. The island was ceded to Great Britain by the Treaty of Nanking, ratified by the Daoguang Emperor in the aftermath of the war of 1842. It was established as a Crown colony in 1843. The colony expanded to include the Kowloon Peninsula in 1860 after the Second Opium War. Hong Kong's territory was further extended in 1898 when the British obtained a 99-year lease of the New Territories.