British Prime Minister Margaret Thatcher shakes hands with Chinese Premier Zhao Ziyang after signing the Sino-British Joint Declaration on December 19, 1984.

The secret negotiations that sealed Hong Kong's future

Updated 2:52 AM ET, Thu June 22, 2017

Hong Kong (CNN)The two leaders sat several feet apart at a long table covered in green silk.

Between them, a tiny twin flagpole bore the standards of the United Kingdom and the People's Republic of China.
The crowd behind applauded as British Prime Minister Margaret Thatcher and Chinese Premier Zhao Ziyang signed large red-bound documents with black fountain pens and then shook hands.
With that, on December 19, 1984, the end of more than 150 years of British rule over Hong Kong was sealed and a timeline put in place for China to assume sovereignty over the city on July 1, 1997.
The people of Hong Kong were not party to the discussions, nor were they consulted about the final decision, which had a profound effect on their futures and freedoms.
As early as 1982, establishing Hong Kong as a Chinese 'Special Administrative Region,' as it is today, was being discussed. Original image altered for clarity.

Treaty territory

The UK acquired the territory that is now China's Hong Kong Special Administrative Region via three treaties. Following the defeat of the Qing Empire in the first and second opium wars (in 1842 and 1860 respectively), the territories of Hong Kong and Kowloon were ceded to the UK.
In 1898, London agreed to lease what became known as the New Territories from the Qing, drastically expanding the amount of land governed by the Hong Kong colony, but also setting in motion the end of British rule.
While the Qing Empire -- and its successors, the Republic of China and the People's Republic of China -- had given up claims for Hong Kong and Kowloon, the lease for the New Territories was set to expire on 30 June 1997.
"We can only maintain sovereign powers in the New Territories up to 1997 in any case and the rest of the territory is not viable on its own," a 1982 UK Foreign Office memo warned Thatcher.
A declassified secret document prepared for newly elected British Prime Minister Margaret Thatcher in June 1979 warns of the upcoming issue of the lease to Hong Kong's New Territories.  Original image altered for clarity.
In his memoirs, David Akers-Jones -- chief secretary of Hong Kong from 1985 to 1987 -- wrote that following the war and the gradual collapse of the British Empire, "Hong Kong recognized that the uncertain future would last until it was known what would happen when the lease of most of the colony, the New Territories, expired."
That future would not include independence, as it did for most other British colonies. After the People's Republic of China joined the United Nations in 1971, Beijing successfully pushed for Hong Kong (along with neighboring Macau, then a Portuguese colony) to be removed from a list of "non-self-governing" territories for whom all steps were to be taken by the UN "to enable them to enjoy complete independence and freedom."
At the start of negotiations between the UK and China over Hong Kong, London hoped to be able to maintain British administration over the former colony. Original image altered for clarity.

Secret talks

In 1982, Thatcher visited Beijing, becoming the first UK Prime Minister to enter Communist China, and formally established negotiations on the future of Hong Kong.
Initially, London hoped to maintain significant control over the city, even if it ceded legal sovereignty to China.
In secret discussions among Thatcher's cabinet -- since declassified -- it was suggested land leases in the New Territories could be converted to indefinite ones in order to "make it possible for British administration to continue beyond 1997 if the Chinese so wish."
That proposal was rejected by Beijing as "unnecessary and inappropriate" in what British ambassador to China Sir Percy Cradock described in a September 1979 memo as a "disappointing reply."
Before negotiations over Hong Kong began in earnest, Thatcher said she was "disturbed" by Chinese insistence on asserting sovereignty over the city. Original image altered for clarity.