On a visit to Hong Kong, Xi Jinping also said "the facts have proved that One Country, Two Systems has great vitality".
Chinese President Xi Jinping has said Hong Kong has been "reborn from the fire", after he arrived there to mark the 25th anniversary of the city's handover.
"In the past period, Hong Kong has experienced more than one serious test, and overcome more than one risk and challenge," Xi said after arriving at a high-speed train station in the heart of the city on Thursday.
"After the storms, Hong Kong has been reborn from the fire and emerged with robust vitality."
Friday's anniversary also marks the halfway point of the 50-year governance model agreed by Britain and China under which the city would keep some autonomy and freedoms.
Critics say a national security law imposed by Beijing after large protests in 2019 has eviscerated those promised freedoms.
But Xi said on Thursday "the facts have proved that One Country, Two Systems has great vitality".
"It can guarantee long-term stability and prosperity in Hong Kong, and defend the well-being of Hong Kong people," he added.
READ MORE: China unveils new Hong Kong leader's cabinet
Xi's visit is the first time he has left mainland China since the Covid-19 pandemic began.
Accompanied by his wife Peng Liyuan and Foreign Minister Wang Yi, he was greeted at the station by schoolchildren waving flags and bouquets of flowers and chanting "Welcome, welcome!" in Mandarin.
Officials including outgoing city leader Carrie Lam and her successor John Lee were present, as well as lion dancers and select accredited media.
Details around the trip have been kept tightly under wraps, and the visit has sparked a massive security effort.
There are large-scale road closures on Hong Kong Island, and the flying of drones has been temporarily banned throughout the entire city, with police citing security concerns.
Those coming into Xi's orbit during the trip have been made to limit their social contacts, take daily PCR tests and check into a quarantine hotel in the days leading up to the visit.
After arriving, Xi met with business and political elites, while Peng, a former celebrity singer, visited a Chinese opera theatre.
Peng and Xi are expected to leave Hong Kong to spend the night in neighbouring Shenzhen on the mainland before returning in the morning for the handover celebration and Lee's inauguration.
The July 1 handover anniversary in Hong Kong has traditionally been marked by tens of thousands taking to the streets in peaceful rallies every year.
But mass gatherings have essentially disappeared in Hong Kong over the past few years under a mixture of coronavirus restrictions and a security crackdown.