Its new rulers in London weren't so impressed by their acquisition, with Foreign Secretary Lord Palmerston famously denouncing it
as a "barren rock with nary a house upon it" that would never "be a mart for trade."
Hong Kong defied these expectations. By 1997, when sovereignty was handed over to China, the city had a population of more than 6.5 million people and a booming economy the envy of its neighbors.
Twenty years later, Hong Kong has evolved again.
British Hong Kong originally only included the island itself (and nearby islets), which was officially ceded to the UK by the Qing Empire in the Treaty of Nanjing in 1842, following China's defeat in the First Opium War.
Eighteen years and another war later, the British assumed control over the Kowloon peninsula, while in 1898 London agreed to lease the New Territories from Beijing for a period of 99 years.
That last step would prove to be the undoing of British Hong Kong, as it set a time limit of July 1, 1997, for China to resume control over the leased land and eventually, after a series of secret negotiations
, take over the entire territory.
Since handover, Hong Kong's incredibly dense population has grown even further, to 7.4 million, or 6,790 people for every square kilometer. In the densest part of the city -- the former industrial area of Kwun Tong, in Kowloon -- there are 57,250 people
per square kilometer, among the most densely populated places on Earth.
From the latter part of the 19th century, Hong Kong grew as an Asian financial center, becoming a major international trading hub
from the 1950s onwards, acting as a regional headquarters for major banking and corporate firms, serving as a gateway to China.
Hong Kong's economy has grown from strength to strength, as the housing, tourism and finance sectors have all boomed -- though the last 20 years have also seen a marked increase in inequality and a rising unemployment rate. Housing prices have risen
from an average of $770 per square foot in 1997, to more than $1,400 today.
Tourism has also grown massively since 1997, with arrivals up to 56.6 million in 2016 compared to 10.4 million the year of handover, fueled by huge growth in mainland Chinese tourists coming to Hong Kong.
Finance however remains Hong Kong's primary industry. The Hang Seng Index was launched in 1969 to serve as a "Dow Jones ... of Hong Kong
." Today it has total value of $1.7 trillion. While in 1997 the majority of the biggest companies on the index were local conglomerates -- or "Hongs" -- today the Hang Seng Index is dominated by Chinese firms.
As well as increasing its population, Hong Kong has also grown in territory, adding to the amount of land available via extensive reclamation projects. Adding land has fundamentally changed the shape of Hong Kong's geography. Possession Point, once on the northwest coast, is now several hundred meters away from the shore.
Since the handover, reclamation and redevelopment has continued apace, particularly in West Kowloon and the northwest New Territories, as well as ongoing expansion to Hong Kong airport.
Hong Kong's skyline has also seen a dramatic change in the years since 1997, particularly with the rapid growth of Hong Kong Island's eastern districts.
From a "barren rock" to a British colony of millions, to a Chinese territory with a booming economy and stratospheric property prices, Hong Kong has changed greatly over the decades.