Hong Kong was a colony and later a dependent territory of the British Empire from 1841 to 1997, apart from a period of occupation under the Japanese Empire from 1941 to 1945 during the Pacific War. The colonial period began with the British occupation of Hong Kong Island in 1841, during the First Opium War between the British and the Qing dynasty. The Qing had wanted to enforce its prohibition of opium importation within the dynasty that was being exported mostly from British India, as it was causing widespread addiction among its populace. The island was ceded to 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. In 1860, the British took the opportunity to expand the colony with the addition of the Kowloon Peninsula after the Second Opium War, while the Qing was embroiled in handling the Taiping Rebellion. With the Qing further weakened after the First Sino-Japanese War, Hong Kong's territory was further extended in 1898 when the British obtained a 99-year lease of the New Territories. Although the Qing dynasty had to cede Hong Kong Island and Kowloon in perpetuity as per the treaty, the leased New Territories comprised 86.2% of the colony and more than half of the entire colony's population. With the lease nearing its end during the late 20th century, Britain did not see any viable way to administer the colony by dividing it, whilst the People's Republic of China (PRC) would not consider extending the lease or allow continued British administration thereafter. With the signing of the Sino-British Joint Declaration in 1984, which stated that the economic and social systems in Hong Kong would remain relatively unchanged for 50 years, the British government agreed to transfer the entire territory to China upon the expiration of the New Territories lease in 1997 – with Hong Kong becoming a special administrative region (SAR) until at least 2047. History Colonial establishment In 1836, the imperial government of the Qing dynasty undertook a major policy review of the opium trade, which had been first introduced to the Chinese by Persian then Islamic traders over many centuries. Viceroy Lin Zexu took on the task of suppressing the opium trade. In March 1839, he became Special Imperial Commissioner in Canton, where he ordered the foreign traders to surrender their opium