The transfer was a complex process that involved a number of legal, political, and economic issues. The two countries had to agree on a number of issues, including the future status of Hong Kong's political and economic systems, the rights of Hong Kong citizens, and the future of the British military garrison in Hong Kong.
The negotiations were eventually concluded in 1984, and the Sino-British Joint Declaration was signed. The Joint Declaration laid out the basic principles for the transfer of Hong Kong, and it guaranteed that Hong Kong would retain its capitalist system and way of life for at least 50 years after the transfer.
The transfer of Hong Kong was a peaceful and orderly process. The British flag was lowered for the last time at midnight on June 30, 1997, and the Chinese flag was raised at midnight on July 1, 1997. The ceremony was attended by Chinese President Jiang Zemin and British Prime Minister Tony Blair.
The transfer of Hong Kong was a significant event in the history of China and Hong Kong. It marked the end of colonialism in Hong Kong, and it opened a new chapter in the history of the city.