Negotiations for the return of Hong Kong to Chinese rule may have begun in 1982, but Britain's real chance of hanging on to its last remaining major colonial possession came many years earlier. Governor Sir Frederick Lugard in 1909 suggested a way of resolving the complex issue of Britain's temporary lease on the New Territories alongside its permanent lease on the rest of Hong Kong; but it was blithely ignored.

Sir Frederick's plan involved trading the permanent cessation of the New Territories as a condition for the return of the British concession of Weihaiwei to China. Weihaiwei was occupied by Britain during the West's 19th-century colonising frenzy.

Sir Frederick's superiors in the Colonial Office took the view that the poor chap had been out in the sun for too long and consigned his suggestion to the rubbish bin. However, at the time China was rather more worried by the British occupation of a central part of the Chinese mainland than it was about the remote southern colony of Hong Kong. In 1930, Weihaiwei was returned to China without any of the conditions suggested by Sir Frederick.

Download the new Independent Premium app Sharing the full story, not just the headlines

There is no guarantee that China would not have reneged on a deal involving the swap of Weihaiwei for the New Territories. However, the fact that Hong Kong is being returned tonight at the moment when the 99-year lease on the New Territories expires suggests that although China was unhappy with the treaties under which Hong Kong came under British rule, it was not bent on ignoring them.

When Britain first arrived in Hong Kong it was riding on the crest of the imperial wave. Its gun boats were out in the South China Sea and the government in London was being egged on by both the opium traders and other merchants to force China into opening the door to commerce. The ailing Qing Dynasty, which had informed the British that China had everything it could want and needed nothing from beyond its shores, was unable to back up its bravado with military might sufficient to repel the British.

The British were not clear what they wanted from China, aside from the notion that it should open its doors to British trade, particularly in opium. London had the idea of a trading base in Macau or even Canton, the heart of the opium trade; Hong Kong was certainly not on the agenda. On the ground, Captain Charles Elliot saw problems with British settlement but liked the look of Hong Kong's natural harbour. So, without orders to do so, he decided to claim this tiny "barren island" in 1841.

Lord Palmerston, the Foreign Secretary, was furious. "You have disobeyed and neglected your instructions," he raged in a letter to Captain Elliot. Notwithstanding these reservations Hong Kong was recognised as a colony two-and- a-half years later. However, it was given few resources and administered, in its early days, by the lowest officials of the colonial service. China has never recognised the "unequal treaties" which forced the Qing Dynasty to cede Hong Kong to the British. The first Hong Kong treaty, the Treaty of Nanjing, signed in 1842, ceded the island of Hong Kong to Britain in perpetuity.

In 1860, as Britain's imperial appetite increased, China was forced to cede the Kowloon peninsula under the first Convention of Peking, which gave Britain a slice of Chinese mainland on the peninsula which juts out to meet Hong Kong island. It was not until 9 June 1898 that the third, and as it turned out, crucial, treaty was signed. This was the second Convention of Peking, which leased the New Territories to Britain for 99 years, starting on 1 July. It is this treaty which expires tomorrow.

The British empire was thus temporarily extended by an area of just over 365 square miles, covering the land area between the Kowloon peninsula and the new Chinese border as well as 235 islands.

Theoretically Britain was entitled to maintain its presence on Hong Kong island and the Kowloon peninsula indefinitely, but it was clear the colony could not function without its New Territories hinterland, accounting for more than 90 per cent of Hong Kong's land mass.

When the second Convention of Peking was signed neither the British nor the Chinese thought that this would impose a timetable on the length of imperial rule. Nor did either party give much thought to the 99-year time span of the treaty which was almost casually fixed.

The first Convention of Peking came about because the British garrison wanted more space for military exercises; the second convention was largely motivated by the general idea that as other foreign powers were seizing more Chinese territory, it would probably be a good idea if Britain were to do the same. There was no thought given to the notion that the colony might grow to a degree where extra space would be a necessity. All attention was focused on Hong Kong island.

The only time Britain was called upon to defend its sovereignty over Hong Kong came during the Second World War when Japan invaded. Winston Churchill decided that this colony was indefensible. As a result Hong Kong was given no real resources to halt the Japanese advance and there was considerable loss of life among the troops making a heroic last ditch stand.

After the war Churchill decided that, despite American pressure, and the claims of Chiang Kai-shek's nationalist government in China, Hong Kong would remain a British colony. "`Hands off the British Empire' is our maxim," he declared.

9 An extract from Stephen Vines' forthcoming book, Awaiting the Avalanche: An Eyewitness Account of Hong Kong's Return to Chinese Rule.