|Hu Jintao offered greetings to the people of Hong Kong|
Hong Kong has begun marking the 15th anniversary since its handover from UK to Chinese control.
Chinese President Hu Jintao is leading the main events. He earlier swore in businessman CY Leung as the territory's new leader.
Small groups of protesters have tried to disrupt his visit.
One of their main complaints is that the system used to choose Hong Kong's leader is designed to install Beijing's choice.
A so-called electoral college of 1,200 business leaders and other influential citizens, mostly loyal to Beijing, chooses the leader.
At the swearing-in ceremony, Mr Hu offered "warm congratulations" to Mr Leung and his team and described the 15th anniversary as a "joyous occasion".
He reiterated Beijing's commitment to the "one country, two systems" policy whereby Hong Kongers are allowed many more political freedoms than Chinese people in the mainland.
A lone heckler stood and shouted at the Chinese president during the speech, referring to the 1989 Tiananmen Square massacre, but he was quickly bundled out of the harbourfront building.
The ceremony took place under tight security.
The BBC's Juliana Liu, in Hong Kong, says Mr Hu's visit has been carefully choreographed.
But on Saturday police had to shield the president from demonstrators, and officers used pepper spray to disperse crowds who were demanding an investigation into the death in China of a Tiananmen activist, Li Wangyang, earlier this year.
It is a far cry from Mr Hu's last visit five years ago, when he toured Hong Kong in a blaze of pre-Olympic glory, says our correspondent.
His visit comes as public confidence in the Beijing government has fallen to a new low.
People are unhappy with record property prices, an increasing wealth gap, a lack of democracy and a string of political scandals.
An annual protest in support of human rights is due to take place later, with tens of thousands expected to attend.
Hong Kong, a British colony until 1997, has a comparatively high degree of autonomy from Beijing.
But China's leaders in Beijing have resisted public pressure for full democracy in the city.
News by BBC
Read current news at http://bbc-cnn-worldnews.blogspot.com