The Chinese president has sworn in the new leader of Hong Kong, Carrie Lam, as the territory marks 20 years since its handover to China from Britain.
Xi Jinping joined a series of lavish events, including a flag-raising ceremony, amid tight police security, with many parts of the city shut down.
But clashes have taken place between pro-democracy and pro-Beijing demonstrators close to the site, with several arrests made.
Many parts of the city were shut down as part of the security operation.
The pro-democracy party, Demosisto, said police had arrested five of its members, and four members from the League of Social Democrats.
Among those said by the group to have been arrested was Joshua Wong, the leader of the so-called umbrella protest movement.
The BBC's Hong Kong correspondent Juliana Liu said in a tweet on Saturday that there had been "lots of scuffles" between police and pro-democracy protesters.
Meanwhile, Mr Xi has overseen the swearing in of the newly-elected chief executive of the territory, Carrie Lam, along with the rest of her cabinet.
She is Hong Kong's first female leader.
In a speech on Saturday the Chinese president said Hong Kong now enjoyed more freedom than ever before, but warned against "impermissible" challenges to Beijing's authority over the city.
"Any efforts to endanger national sovereignty, challenge the authority of the central government and the Hong Kong Basic Law, and use Hong Kong to penetrate and sabotage the mainland, cross the bottom line and are absolutely impermissible," he said in an address after the swearing in of Ms Lam.
It followed a ceremony in which the flags of China and Hong Kong were raised alongside one another to mark the 20-year anniversary of the city's handover of British rule.