Hong Kong was established as a colony of the British Empire after the Qing Empire ceded Hong Kong Island from Xin'an County at the end of the First Opium War in 1841 then again in 1842. The colony expanded to the Kowloon Peninsula in 1860 after the Second Opium War and was further extended when Britain obtained a 99-year lease of the New Territories in 1898. British Hong Kong was occupied by Imperial Japan from 1941 to 1945; British administration resumed after the surrender of Japan. The whole territory was transferred to China in 1997. As one of China's two special administrative regions (the other being Macau), Hong Kong maintains separate governing and economic systems from that of mainland China under the principle of "one country, two systems".