It was the smoothest of handovers. At 11.59pm on June 30, 1997, a little after guests at Hong Kong's Regent Hotel had enjoyed curry in the Raj room and rum punches in the Caribbean room, a military band struck up God Save the Queen. The Union flag - and the British Empire with which it had for so long been synonymous - fell in unison.
The last note had hardly faded when the band of the People's Liberation Army struck up a rather different anthem.
Just as they did so, at the stroke of midnight, the red and yellow-starred flag of Communist China began to be raised. After 156 years, Britain was surrendering its last major colony - but, for a time, it seemed only the pomp was changing.
Twenty years on, Hong Kong is preparing for another act of street theatre. On July 1, Xi Jinping is expected to make his first visit as China's President. He will commemorate the anniversary with a flag-raising ceremony to swear in the city's new chief executive, Carrie Lam. Under the slogan "Together, Progress, Opportunity", the Government has organised more than 500 celebratory events, including concerts, competitions and exhibitions.
Yet behind the hoopla, the transition from British to Chinese rule has been rather bumpier. Under the handover agreement, Beijing agreed to permit "one country, two systems" for 50 years. Hong Kong would become part of China, but it would be a "special administrative region", with its capitalist system and freedoms such as an independent press and judiciary respected. A growing number of Hong Kongers believe China is honouring its commitment only in name, and has welched on its promise to deliver democracy.