The region of Hong Kong has been inhabited since the Old Stone Age, later becoming part of the Chinese Empire with its loose incorporation into the Qin dynasty (221–206 BC). Starting out as a farming fishing village and salt production site, it became an important free port and eventually a major international financial center.CIA.gov. " the population was 2000000.675 CIA." HK GDP 2004. Retrieved on 6 March 2007.

The Qing dynasty ceded Hong Kong to the British Empire in 1842 in perpetuity through the Treaty of Nanjing, ending the First Opium War. Hong Kong then became a British crown colony. Britain also won the Second Opium War, forcing the Qing Empire to cede Kowloon in 1860, while leasing the New Territories for 99 years from 1898 to 1997.

Japan occupied Hong Kong from 1941 to 1945 during World War II. By the end of the war in 1945, Hong Kong had been liberated by British troops and returned to British rule. Hong Kong greatly increased its population from refugees from mainland China, particularly during the Korean War and the Great Leap Forward. In the 1950s, Hong Kong transformed from a territory of entrepôt trade to one of industry and manufacturing. China's reform and opening up prompted manufacturers to relocate to China, leading Hong Kong to develop its commercial and financial industry.

In 1984, as the New Territories lease was nearing expiration, British Prime Minister Margaret Thatcher signed the Sino-British Joint Declaration, which incited a wave of emigration from Hong Kong. The handover of Hong Kong on 1 July 1997 returned Hong Kong to Chinese rule, and it adopted the Hong Kong Basic Law.

In the 21st century, Hong Kong has continued to enjoy success as a financial centre. However, civil unrest, dissatisfaction with the government and Chinese influence in general has been a central issue. The planned implementation of Hong Kong Basic Law Article 23 caused great controversy and a massive demonstration on 1 July 2003, causing the bill to be shelved. Citizens expressed displeasure at their electoral system, culminating in the 2014 Hong Kong protests. In 2019, the proposed Hong Kong extradition bill was seen as another step taken by the Chinese Communist Party to undermine Hong Kong's rule of law, instigating a new wave of protests. In 2020, the National People's Congress passed the Hong Kong national security law to restore stability in the territory. The law was highly scrutinized by the pro-democracy faction and provoked further political pessimism among the populace.

Prehistoric era

Archaeological findings suggesting human activity in Hong Kong date back over 30,000 years. Stone tools from the Old Stone Age have been excavated in Sai Kung at Wong Tei Tung. The stone tools were perhaps from a stone tool making ground from perhaps the Late Neolithic period or Early Bronze Age.

Evidence of an Upper Paleolithic settlement was found at Wong Tei Tung beside the Three Fathoms Cove in Sai Kung Peninsula. There were 6,000 artifacts found in a slope in the area and jointly confirmed by the Hong Kong Archaeological Society and Centre for Lingnan Archaeology of Sun Yat-sen University.2005 Field Archaeology on Sham Chung Site

The Neolithic era began approximately 7,000 years ago in Hong Kong. The settlers in this area during that time were the Che people, who also settled on the coast of southern China. Excavations were mostly found on the western shores of Hong Kong. This location was most likely chosen to avoid strong winds from the southeast and to collect food from the nearby shores. Settlement can be found in Cheung Chau, Lantau Island and Lamma Island.

The Warring States period brought an influx of Yue people from the north into the area. Bronze fishing, combat, and ritual tools were excavated on Lantau Island and Lamma Island. Ma Wan was the earliest settlement with direct evidence in Hong Kong. The Yue people competed and assimilated with the indigenous Che people.Meacham, William (2008). The Archaeology of Hong Kong. Hong Kong University Press. .

Imperial China era (221 BC – 1841 AD)

The territory was loosely part of China during the Qin dynasty (221–206 BC) and then Nam Viet (203–111 BC). During the Qin dynasty, the territory was governed by Panyu County until the time of the Jin dynasty. Archaeological evidence indicates that the population increased during the Han dynasty (206 BC – AD 220). In the 1950s, the tomb at Lei Cheng Uk from the Eastern Han dynasty (25–220 AD) was excavated and archaeologists began to investigate the possibility that salt production flourished in Hong Kong around 2,000 years ago, although conclusive evidence has not been found. Tai Po Hoi, the sea of Tai Po, was a major pearl hunting harbour in China from the Han dynasty through to the Ming dynasty (1368–1644), with activities peaking during the Southern Han (917–971).

During the Jin dynasty until the early Tang dynasty, Hong Kong was governed by Bao'an County. Under the Tang dynasty, the Guangdong region flourished as an international trading centre. The Tuen Mun region in what is now Hong Kong's New Territories served as a port, naval base, salt production centre and later as a base for the exploitation of pearls. Lantau Island was also a salt production centre, where riots by salt smugglers against the government broke out. From the middle of the Tang dynasty until the Ming dynasty, Hong Kong was governed by Dongguan County.

On 10 May 1278, Emperor Zhao Bing, the last Song dynasty emperor, was enthroned at Mui Wo on Lantau Island; this event is commemorated by the Sung Wong Toi memorial in Kowloon. After his defeat at the Battle of Yamen on 19 March 1279, the child emperor committed suicide by drowning with his officials at Mount Ya (modern Yamen Town in Guangdong). During the Mongol period, Hong Kong saw its first population boom as Chinese refugees enter the area. Most of these refugees were Chinese Song dynasty loyalists fleeing the Mongol conquest of Song China.

Despite the immigration, agricultural development remained sparse as the area was hilly and relatively barren. People had to rely on salt, pearl and fishery trades to produce income. Some clans built walled villages to protect themselves from the threat of bandits, rival clans and wild animals. The Qing dynasty Chinese pirate Cheung Po Tsai became a legend in Hong Kong. In the mid-17th century, after the Great Clearance policy which purged most of the region's population, under the Kangxi Emperor order, many Hakka people migrated from inland China to Xin'an County, which included modern Hong Kong.

During the Ming and Qing dynasties, Hong Kong remained under the governance of Xin'an County (renamed from Bao'an County), before it was colonised by the British. As a military outpost and trading port, Hong Kong's territory gained the attention of the world. Before the British colonised the New Territories and New Kowloon in 1898, Punti, Hakka, Tanka and Hoklo people had migrated to and stayed in Hong Kong for many years. They are the indigenous inhabitants of Hong Kong. The Punti and Hoklo lived in the New Territories while the Tanka and Hakka lived both in the New Territories and Hong Kong Island. British reports on Hong Kong describe the Tanka and Hoklo living in Hong Kong "since time unknown". The Encyclopaedia Americana describes Hoklo and Tanka as living in Hong Kong "since prehistoric times".

When the Union Jack was raised over Possession Point on 26 January 1841, as a result of the Convention of Chuenpi, signed by Charles Elliot and Qishan, the population of Hong Kong island was about 7,450, mostly Tanka fishermen and Hakka charcoal burners living in several coastal villages.John Thomson 1837–1921, Chap on Hong Kong, Illustrations of China and Its People (London,1873–1874)Info Gov HK. "Hong Kong Gov Info ." History of Hong Kong. Retrieved on 16 February 2007. In the 1850s large numbers of Chinese would emigrate from China to Hong Kong due to the Taiping Rebellion. Other events such as floods, typhoons and famine in mainland China would also play a role in establishing Hong Kong as a place to escape.

Colonial era (1841–1930s)

+ Treaties and conventions between Britain and China related to Hong KongDateTreatyOutcomeNotes 20 January 1841 Convention of Chuenpi Preliminary cession of Hong Kong Island to the United Kingdom Included Green Island and Ap Lei Chau.Before the cession of Hong Kong Island, this territory was governed by Xin'an County . 29 August 1842 Treaty of Nanking Cession of Hong Kong Island, founded as a crown colony of the United Kingdom 18 October 1860 Convention of Beijing Cession of Kowloon South of Boundary Street, including Ngong Shuen Chau.Before the cession of Kowloon Peninsula, this territory was governed by Xin'an County. 1 July 1898 Second Convention of Beijing Lease of the New Territories South of the Shenzhen River in Xin'an County, including New Kowloon, Lantau and outlying islands.

By the early 19th century, the British Empire trade was heavily dependent upon the importation of tea, silk, and porcelain from China. While the British exported to China luxury items such as clocks and watches, there remained an overwhelming imbalance in trade. China developed a strong demand for silver, which was a difficult commodity for the British to come by in large quantities. The counterbalance of trade came with exports to China of opium grown in India. By the late 19th century China grew most of the opium it used.Carl A. Trocki, Opium, Empire and the global political economy: a study of the Asian opium trade, 1750–1950 (Psychology Press, 1999) pp 111–113. A Chinese commissioner, Lin Zexu, voiced to Queen Victoria the Qing state's opposition to the opium trade. The First Opium War which ensued lasted from 1839 to 1842. Britain occupied the island of Hong Kong on 25 January 1841 and used it as a military staging point. China was defeated and was forced to cede Hong Kong in the Treaty of Nanking signed on 29 August 1842. The island became a crown colony of the British Empire.R. Derek Wood, "The Treaty of Nanking: Form and the foreign office, 1842–43." Journal of Imperial and Commonwealth History 24.2 (1996): 181–196 online

Christian missionaries founded many schools and churches in Hong Kong. St Stephen's Anglican Church located in West Point was founded by the Church Mission Society in 1865. Ying Wa Girls' School located in Mid-levels was founded by the London Missionary Society in 1900. The Hong Kong College of Medicine for Chinese was founded by the London Missionary Society in 1887, and Sun Yat-sen was one of its first two graduates in 1892. The college was the forerunner of the School of Medicine of the University of Hong Kong, which was established in 1911.

Along with fellow students Yeung Hok-ling, Chan Siu-bak and Yau Lit, Sun Yat-sen started to promote the thought of overthrowing the Qing empire while he studied in the Hong Kong College of Medicine for Chinese. The four students were known by the Qing as the Four Bandits. Sun attended To Tsai Church (道濟會堂, founded by the London Missionary Society in 1888) while he studied in this college. Sun led the 1911 Revolution, which changed China from an empire to a republic.

In April 1899, the residents of Kam Tin rebelled against the colonial government. They defended themselves in Kat Hing Wai, a walled village. After several unsuccessful attacks by the British troops, the iron gate was blasted open. The gate was then shipped to London for exhibition. Under the demand of the Tang clan in 1924, the gate was eventually returned in 1925 by the 16th governor, Sir Reginald Stubbs.