Ceremonies have been taking place in Hong Kong to mark the 10th anniversary of its return to China, with Chinese President Hu Jintao guest of honour.
At midnight, Buddhist monks held a bell-chiming ceremony, counting down to the moment of the anniversary.
Hong Kong was returned at midnight on 30 June 1997 after more than 150 years of British rule.
Earlier, police scuffled with several dozen pro-democracy activists who were trying to petition Mr Hu.
On Sunday, Mr Hu will oversee the swearing-in of Chief Executive Donald Tsang's new cabinet.
But he is set to leave the territory before a pro-democracy march in the afternoon.
Ahead of the bell-ringing, Mr Hu and Mr Tsang attended a traditional variety show featuring the socialist work Yellow River, played by famed pianist Lang Lang.
In a speech at a gala dinner, Mr Hu urged unity between Hong Kong and the mainland.
"No matter what kind of doctrine you believe in, or religion, you must, under the flag of loving Hong Kong and loving China, closely unite together," he said.
Monks chimed a countdown to the anniversary of the handover
But Mr Hu also urged Hong Kong's leaders to heed the public more, without being specific as to how.
The special administrative region operates under the "one country, two systems" principle.
Its post-handover constitution allows for full suffrage to be introduced but does not set any timetable.
At the same time as the bell-ringing, pro-democracy figures re-enacted the protest they held on the Legislative Council balcony in 1997.
Veteran democracy campaigner Martin Lee said: "Ten years have passed. Today all the pan-democrats have come back here together with a united purpose - recommitting ourselves to the fight for democracy."
In heavy rain, reminiscent of the downpours that greeted the handover ceremonies a decade earlier, several dozen activists had earlier in the evening tried to reach Mr Hu's hotel.
More than 100 police officers kept the protesters, who were shouting slogans such as "power to the people", away from the building.
Mr Hu arrived on Friday on his first visit to Hong Kong as president.
On Saturday he reviewed the territory's garrison and a gift of two giant pandas was presented to Hong Kong.
China's anniversary gift is a runaway crowd-puller
Lok Lok and Ying Ying have been drawing large crowds at their new habitat in the Ocean Park amusement centre.
Districts around Hong Kong have been holding street carnivals and there are overnight parties in clubs and bars across the city, some of them called Unity, or DisUnity, parties.
No foreign representatives have been invited to attend the anniversary events, with the focus instead on Hong Kong's closer ties with the mainland.
After some tough years of economic crisis, the economy is doing well. Hong Kong's way of life has not really changed and key institutions are still independent and accountable.
Many citizens increasingly describe themselves as Chinese, as well as Hong Kong people.