Hong Kong was given to the British in the Treaty of Nanking in 1842, which also opened China to foreign trade and made it so that British nationals were exempt from Chinese laws. The British called the island Hong Kong, meaning 'fragrant harbor.' When it was given to the British it had few people, but they turned it into a permanent outpost to China. The second opium war, instigated after China searched a British vessel for pirates, made China hand the rest of the Hong Kong area over to Britain.
After forty or so years, the population had tripled. The British decided that they should ask China for more land so they could better protect Hong Kong. In the second Convention of Peking, China gave Britain a large slice of land and a ninety-nine year lease, meaning that Hong Kong would need to be given back by June 30th, 1997. The picture below shows what areas were transferred to Britain.
Even while Britain was raking in money by trading with China, they suffered. Typhoons, fever, the plague, criminals, and opium dens (above) seemed to be bringing Hong Kong down. However, they did manage to raise the population to 265,000 and set up several power companies and transportation services, as well as other industries such as banking and insurance. Buildings were built, trees were planted, and money was made, but Hong Kong still lived in the shadow of Shanghai, the largest trade capital in Asia. Nevertheless, people kept coming from China to Hong Kong. Most came to get away from China, where there was strife and famine, not to mention the leaders of the time. The population increased further still when Japan invaded China in World War Two, forcing the Chinese to hide in Hong Kong. The protection in Hong Kong was great, but short lived. After the bombing of Pearl Harbor, the Japanese swept into Hong Kong. After two weeks of resistance, the British lost and the Japanese took over. Some people fled to Macau, and others were deported to ease the food shortages. The population dropped from 1.6 million to six hundred thousand.
After Japan lost the war and moved out of Hong Kong, the British switched tactics. Hong Kong wouldn't be a trader to China; it would make its own goods to sell. At the same time, the emerging Communism in China drove more to Hong Kong, flooding it with new residents. The population in 1950: 2.3 million. In 1951, Hong Kong made lots of money when the US declared an embargo on China and North Korea. They became a great supplier of manufactured goods and financial services. However, this came at a price. There were horrible working conditions, such as unsafe work areas and child labor. Even after a set of improvements, there were a series of riots over things such as high prices and pent-up frustration. The Chinese, who had recently changed to Communism, had sent three hundred men into Hong Kong, killing five policemen and getting three kilometers into Hong Kong territory. Tourism stopped. Trade with China was almost impossible. Housing prices dropped. Luckily, by the end of the 1960's, China regained its senses and stopped the attacks. Below is a picture from the 1967 riots. They are burning bamboo baskets.
When China was done sending men to the border, Hong Kong went back to making money. Cheaper ways of transport were made, such as railways and tunnels. Towns were expanded, letting millions get better housing. In 1973 there was a huge stock market crash, but it didn't deter them for long. They soon were making more money than ever, but several countries were mimicking their success strategy. This stole money from Hong Kong, but just then Mao Zedong died, letting Deng Xiaoping take control of China. He opened tourism and trade with the world, and Hong Kong was still the 'Gateway' to China. Then they were suddenly in a drive to make as much money as possible before January 1997, the day of Hong Kong's return.