|Hong Kong activists claim betrayal on promised rights|
They had been trying to march towards the city's convention centre, where President Xi Jinping was swearing in the territory's new leader, Carrie Lam.
Protesters carried banners with the words "Democracy. Self-determination", as well as a replica coffin, meant to signify the demise of promised civil liberties.
One of the movement's leaders, Joshua Wong, was taken away in handcuffs for the second time in three days, but later released.
He said: "Carrie Lam ... is a nightmare for Hong Kong. Theoretically, the chief executive is a bridge between the central government and the Hong Kong people. But Lam will be a tilted bridge.
"She will only tell us what Beijing wants, and won't reflect what the people want to the communist regime."
A large group of pro-China protesters was allowed to remain, waving flags and chanting "Long live China."
|Carrie Lam has been sworn in as Hong Kong's new chief executive|
Under the "one country, two systems" principle agreed during Hong Kong's handover from British rule in 1997, the territory's rights, such as freedom of expression and the rule of law, were meant to be protected for 50 years.
Universal suffrage was described as the "ultimate aim".
Instead, Hongkongers on Saturday watched career civil servant Ms Lam taking the oath of office, after being elected with just 777 votes by a committee stacked with pro-Beijing loyalists earlier this year.
In his speech, President Xi made stressed economic development as the "top priority", and warned the territory not to challenge China's authority.
"Any attempt to endanger China's sovereignty and security, challenge the power of the central government and the authority of the Basic Law of the HKSAR or use Hong Kong to carry out infiltration and sabotage activities against the mainland is an act that crosses the red line and is absolutely impermissible," he said.
Under blue skies by the harbourside, the Chinese flag was raised in a televised ceremony on the same site as it had been 20 years ago, after the Union flag was lowered.
|Pro-China supporters hold Chinese flags|
As the national anthem played, helicopters flew overhead with vast Chinese and Hong Kong flags.
Ms Lam was seen wiping tears from her eyes with a handkerchief.
There was no trace of the protest that had taken place in the same square three days ago, when campaigners chained themselves to the now-gleaming golden Bauhinia statue, and draped it in black.
The symbolic Bauhinia flower monument had been presented to the city as a gift from Beijing during the handover celebrations in 1997.
Speaking in Mandarin for her inaugural address, instead of the Cantonese dialect widely used in Hong Kong, Mrs Lam told assembled dignitaries she wanted to create a harmonious society, and described the future as "bright".
But politician and pro-democracy campaigner Nathan Law told Sky News the anniversary was one of "gloom". He said this was a time to demonstrate, not celebrate, and to defend the territory's rights.