<a href="https://www.thenationalnews.com/tags/china/" target="_blank">China</a>'s President Xi Jinping attended the swearing-in ceremony of Hong Kong’s new chief executive on Friday as the city marked the 25th anniversary of its handover to China. John Lee, a former security official who oversaw implementation of a new national security law following pro-democracy protests in 2019, pledged to uphold the city’s mini-constitution, the Basic Law, and to be accountable to the central government in Beijing. His inauguration followed a morning flag-raising ceremony attended by departing leader Carrie Lam and several hundred other people. Mr Xi, who was making his first trip outside mainland China since the start of the Covid-19 pandemic, was not present at the flag-raising ceremony, with media reporting that he stayed the night across the border in Shenzhen after arriving in Hong Kong on Thursday. The Chinese leader said on Thursday that the city had overcome many challenges over the years and had been “reborn from the ashes” with “vigorous vitality,” in an apparent reference to the 2019 protests. He last visited Hong Kong in 2017 for celebrations to mark 20 years since Britain's handover of the former colony. At the time, he warned that there would be no tolerance for any activities seen as threatening China’s sovereignty and stability. The months of pro-democracy protests in 2019 were seen by China’s ruling Communist Party as such a threat. Mr Xi on Thursday praised Ms Lam for ending chaos that had gripped the city and for ensuring that only “patriots” would rule Hong Kong. Scores of activists, media figures and democracy supporters have been arrested under the national security law drafted by Beijing and Hong Kong authorities. Authorities introduced a more “patriotic” curriculum in schools and made changes to the election laws that make it more difficult for opposition politicians to enter the city’s legislature. Britain returned Hong Kong to Chinese rule on July 1, 1997, under a "one country, two systems" formula which guaranteed wide-ranging autonomy and judicial independence not seen in mainland China. <i>With reporting from agencies.</i>