In 1836, the Manchu Qing government undertook a major policy review of the opium trade. Lin Zexu volunteered to take on the task of suppressing opium. In March 1839, he became Special Imperial Commissioner in Canton, where he ordered the foreign traders to surrender their opium stock. He confined the British to the Canton Factories and cut off their supplies. Chief Superintendent of Trade, Charles Elliot, complied with Lin's demands to secure a safe exit for the British, with the costs involved to be resolved between the two governments. When Elliot promised that the British government would pay for their opium stock, the merchants surrendered their 20,283 chests of opium, which were destroyed in public.
In September 1839, the British Cabinet decided that the Chinese should be made to pay for the destruction of British property, either by threat or use of force. An expeditionary force was placed under Elliot and his cousin, Rear Admiral George Elliot, as joint plenipotentiaries in 1840. Foreign Secretary Lord Palmerston stressed to the Chinese Imperial Government that the British Government did not question China's right to prohibit opium, but it objected to the way this was handled. He viewed the sudden strict enforcement as laying a trap for the foreign traders, and the confinement of the British with supplies cut off was tantamount to starving them into submission or death. He instructed the Elliot cousins to occupy one of the Chusan islands, to present a letter from himself to a Chinese official for the Emperor, then to proceed to the Gulf of Bohai for a treaty, and if the Chinese resisted, blockade the key ports of the Yangtze and Yellow rivers. Palmerston demanded a territorial base in Chusan for trade so that British merchants "may not be subject to the arbitrary caprice either of the Government of Peking, or its local Authorities at the Sea-Ports of the Empire".
In 1841, Elliot negotiated with Lin's successor, Qishan, in the Convention of Chuenpi during the First Opium War. On 20 January, Elliot announced "the conclusion of preliminary arrangements", which included the cession of Hong Kong Island and its harbour to the British Crown. On 26 January, the Union Jack was raised on Hong Kong and Commodore James Bremer, commander-in-chief of British forces in China, took formal possession of the island at Possession Point. Elliot chose Hong Kong instead of Chusan because he believed a settlement further east would cause an "indefinite protraction of hostilities", whereas Hong Kong's harbour was a valuable base for the British trading community in Canton. On 29 August 1842, the cession was formally ratified in the Treaty of Nanking, which ceded Hong Kong "in perpetuity" to Britain.
The treaty failed to satisfy British expectations of a major expansion of trade and profit, which led to increasing pressure for a revision of the terms. In October 1856, Chinese authorities in Canton detained the Arrow, a Chinese-owned ship registered in Hong Kong to enjoy protection of the British flag. The Consul in Canton, Harry Parkes, claimed the hauling down of the flag and arrest of the crew were "an insult of very grave character". Parkes and Sir John Bowring, the 4th Governor of Hong Kong, seized the incident to pursue a forward policy. In March 1857, Palmerston appointed Lord Elgin as Plenipotentiary with the aim of securing a new and satisfactory treaty. A French expeditionary force joined the British to avenge the execution of a French missionary in 1856. In 1860, the capture of the Taku Forts and occupation of Beijing led to the Treaty of Tientsin and Convention of Peking. In the Treaty of Tientsin, the Chinese accepted British demands to open more ports, navigate the Yangtze River, legalise the opium trade and have diplomatic representation in Beijing. During the conflict, the British occupied the Kowloon Peninsula, where the flat land was valuable training and resting ground. The area in what is now south of Boundary Street and Stonecutters Island was ceded in the Convention of Peking.
In 1898, the British sought to extend Hong Kong for defence. After negotiations began in April 1898, with the British Minister in Beijing, Sir Claude MacDonald, representing Britain, and diplomat Li Hongzhang leading the Chinese, the Second Convention of Peking was signed on 9 June. Since the foreign powers had agreed by the late 19th century that it was no longer permissible to acquire outright sovereignty over any parcel of Chinese territory, and in keeping with the other territorial cessions China made to Russia, Germany and France that same year, the extension of Hong Kong took the form of a 99-year lease. The lease consisted of the rest of Kowloon south of the Shenzhen River and 230 islands, which became known as the New Territories. The British formally took possession on 16 April 1899.
In 1941, during the Second World War, the British reached an agreement with the Chinese government under Generalissimo Chiang Kai-shek that if Japan attacked Hong Kong, the Chinese National Army would attack the Japanese from the rear to relieve pressure on the British garrison. On 8 December, the Battle of Hong Kong began when Japanese air bombers effectively destroyed British air power in one attack. Two days later, the Japanese breached the Gin Drinkers Line in the New Territories. The British commander, Major-General Christopher Maltby, concluded that the island could not be defended for long unless he withdrew his brigade from the mainland. On 18 December, the Japanese crossed Victoria Harbour. By 25 December, organised defence was reduced into pockets of resistance. Maltby recommended a surrender to Governor Sir Mark Young, who accepted his advice to reduce further losses. A day after the invasion, Generalissimo Chiang ordered three corps under General Yu Hanmou to march towards Hong Kong. The plan was to launch a New Year's Day attack on the Japanese in the Canton region, but before the Chinese infantry could attack, the Japanese had broken Hong Kong's defences. The British casualties were 2,232 killed or missing and 2,300 wounded. The Japanese reported 1,996 killed and 6,000 wounded.
The Japanese soldiers committed atrocities, including rape, on many locals. The population fell in half, from 1.6 million in 1941 to 750,000 at war's end because of fleeing refugees; they returned in 1945.
The Japanese imprisoned the ruling British colonial élite and sought to win over the local merchant gentry by appointments to advisory councils and neighbourhood watch groups. The policy worked well for Japan and produced extensive collaboration from both the élite and the middle class, with far less terror than in other Chinese cities. Hong Kong was transformed into a Japanese colony, with Japanese businesses replacing the British. However, the Japanese Empire had severe logistical difficulties and by 1943 the food supply for Hong Kong was problematic. The overlords became more brutal and corrupt, and the Chinese gentry became disenchanted. With the surrender of Japan, the transition back to British rule was smooth, for on the mainland the Nationalist and Communist forces were preparing for a civil war and ignored Hong Kong. In the long run the occupation strengthened the pre-war social and economic order among the Chinese business community by eliminating some conflicts of interests and reducing the prestige and power of the British.
On 14 August 1945, when Japan announced its unconditional surrender, the British formed a naval task group to sail towards Hong Kong. On 1 September, Rear Admiral Cecil Harcourt proclaimed a military administration with himself as its head. He formally accepted the Japanese surrender on 16 September in Government House. Sir Mark Young, upon his return as Governor in early May 1946, pursued political reform known as the "Young Plan", believing that, to counter the Chinese government's determination to recover Hong Kong, it was necessary to give local inhabitants a greater stake in the territory by widening the political franchise to include them.
The Sino-British Joint Declaration was signed by both the Prime Minister of the United Kingdom and the Premier of the People's Republic of China on 19 December 1984 in Beijing. The Declaration entered into force with the exchange of instruments of ratification on 27 May 1985 and was registered by the People's Republic of China and United Kingdom governments at the United Nations on 12 June 1985. In the Joint Declaration, the People's Republic of China Government stated that it had decided to resume the exercise of sovereignty over Hong Kong (including Hong Kong Island, Kowloon, and the New Territories) with effect from 1 July 1997 and the United Kingdom Government declared that it would relinquish Hong Kong to the PRC with effect from 1 July 1997. In the document, the People's Republic of China Government also declared its basic policies regarding Hong Kong.
In accordance with the One Country, Two Systems principle agreed between the United Kingdom and the People's Republic of China, the socialist system of People's Republic of China would not be practised in the Hong Kong Special Administrative Region (HKSAR), and Hong Kong's previous capitalist system and its way of life would remain unchanged for a period of 50 years. The Joint Declaration provides that these basic policies shall be stipulated in the Hong Kong Basic Law. The ceremony of the signing of the Sino-British Joint Declaration took place at 18:00, 19 December 1984 at the Western Main Chamber of the Great Hall of the People. The Hong Kong and Macau Affairs Office at first proposed a list of 60–80 Hong Kong people to attend the ceremony. The number was finally extended to 101. The list included Hong Kong government officials, members of the Legislative and Executive Councils, chairmen of The Hongkong and Shanghai Banking Corporation and Standard Chartered Bank, Hong Kong celebrities such as Li Ka-shing, Pao Yue-kong and Fok Ying-tung, and also Martin Lee Chu-ming and Szeto Wah.
The handover ceremony was held at the new wing of the Hong Kong Convention and Exhibition Centre in Wan Chai on the night of 30 June 1997. The principal British guest was Charles, Prince of Wales who read a farewell speech on behalf of the Queen. The newly appointed Prime Minister of the United Kingdom, Tony Blair, the British Foreign Minister Robin Cook, the departing Hong Kong governor Chris Patten, General Sir Charles Guthrie, Chief of the Defence Staff of the United Kingdom also attended.
Representing China were the President of the People's Republic of China, Jiang Zemin, Premier of the People's Republic of China, Li Peng, and Tung Chee-hwa, the first Chief Executive of the Hong Kong Special Administrative Region of the People's Republic of China. This event was broadcast on television and radio stations across the world.
In January 1841, when Elliot declared Hong Kong's cession to Britain, he proclaimed that the government shall devolve upon the office of Chief Superintendent of British Trade in China. He issued a proclamation with Commodore Bremer to the inhabitants on 1 February, declaring that they "are hereby promised protection, in her majesty's gracious name, against all enemies whatever; and they are further secured in the free exercise of their religious rites, ceremonies, and social customs; and in the enjoyment of their lawful private property and interests." Elliot declared that Chinese natives would be governed under Chinese laws (excluding torture), and that British subjects and foreigners would fall under British law. However, London decided that English law should prevail.
The Letters Patent of 5 April 1843 defined the constitutional structure of Hong Kong as a Crown colony and the Royal Instructions detailed how the territory should be governed and organised. The Letters Patent prescribed a Governor as head of government, and both the Executive Council and Legislative Council being advisors to the Governor. The administrative civil service of the colony was led by a Colonial Secretary (later Chief Secretary), who was deputy to the Governor.
For almost all of its history under British rule, executive power in Hong Kong was concentrated in the hands of the colony governor, a position appointed by the British crown without any democratic input from Hong Kong citizens. The introduction of elected representatives determined by local elections, even limited to the role of "advisory councils", did not begin until after the 1984 agreements by the British to hand Hong Kong over to China.
In 1861, Governor Sir Hercules Robinson introduced the Hong Kong Cadetship, which recruited young graduates from Britain to learn Cantonese and written Chinese for two years, before deploying them on a fast track to the Civil Service. Cadet officers gradually formed the backbone of the civil administration. After the Second World War, ethnic Chinese were allowed into the service, followed by women. Cadets were renamed Administrative Officers in the 1950s, and they remained the elite of the Civil Service during British rule.
The stability, security, and predictability of British law and government enabled Hong Kong to flourish as a centre for international trade. In the colony's first decade, the revenue from the opium trade was a key source of government funds. The importance of opium reduced over time, but the colonial government was dependent on its revenues until the Japanese occupation in 1941. Although the largest businesses in the early colony were operated by British, American, and other expatriates, Chinese workers provided the bulk of the manpower to build a new port city.
By the late 1980s, many ethnic Chinese people had become major business figures in Hong Kong. Amongst these billionaires was Sir Ka-shing Li, who had become one of the colony's wealthiest people by this time.
There was considerable opposition from Chinese nationalists to the British rule due to its implications for Hong Kong self-determination, particularly in the political arena. Early dissent such as the Canton–Hong Kong strike were anti-British and anti-imperialist in nature. Later, the 1966 riots and the 1967 Leftist riots were large scale demonstrations against British colonial rule that was fuelled by tensions surrounding labour disputes and dissatisfaction towards the government. During this period, groups such as the Anti-British Struggle Committee were established for the purpose of targeting the British Colonial government. While primarily organised by pro-Communist members and sympathizers from the mainland, the anti-British movement also garnered local support.