President Xi Jinping will attend a ceremony marking the 25th anniversary of Hong Kong's transfer from British to Chinese rule, official news agency Xinhua said Saturday.

The anniversary will be commemorated on Friday as Hong Kong's rights and freedoms, guaranteed at the 1997 handover, continue to diminish with Beijing tightening its grip on the semiautonomous Chinese city.

Xi has not left mainland China since he traveled to Myanmar in January 2020 and Beijing acknowledged the rapid spread of the coronavirus.

The news agency said the Chinese president will also take part in an event on Friday for the inauguration of John Lee, Hong Kong's former security chief, as the city's new leader, replacing Carrie Lam.

Lee, known as a staunch supporter of crackdowns on pro-democracy activists, has vowed to maintain social order in the former British colony based on a national security law imposed by Beijing in 2020.

His five-year term will begin at the halfway point of Beijing's "one country, two systems" policy for Hong Kong that was set to last for 50 years until 2047.