Ms Lam unexpectedly appeared on the sidelines of a trade event in the mainland Chinese city on Monday night. It followed yet another weekend of violent protests in Hong Kong that were first triggered back in June by her unpopular extradition bill.
Mr Xi and Ms Lam shook hands and smiled while posing for photographs in Shanghai at the conclusion of a brief meeting in which the Chinese president expressed “care and concern” for the situation in Hong Kong, according to Ms Lam.
She told a news conference that she had promised to stamp out the scenes of violence with strict law enforcement, and that in turn Mr Xi had expressed support for measures taken by her government to end the crisis.
According to a Xinhua report of the meeting, Mr Xi said the Hong Kong chief executive had “done a lot of hard work” to try and stabilise the situation in her city.
“Xi voiced the central government’s high degree of trust in Lam and full acknowledgement of the work of her and her governance team,” it read.
The meeting was a “vote of confidence” in the devolved government of the city, said Matthew Cheung, Hong Kong’s chief secretary and its acting chief executive with Ms Lam on the mainland.
Mr Cheung said he “deeply regretted” that some civil servants and public sector workers had joined the months-long protests in recent weeks.
“Their first job is to serve society, serve the community. And to support government policies, that is the responsibility of the civil servants,” he said.
With the 31 October Halloween celebrations severely disrupted by demonstrations and more protests planned on Tuesday to mark Bonfire Night, pro-democracy MP Claudia Mo described the images of Mr Xi and Ms Lam together as a threat to activists.
“They realized things in Hong Kong have reached a point of no return and there is no choice except for keeping their approval for Carrie Lam with hopes that things will die down,” Ms Mo said.
“The message to Hong Kong people is that we are with her, she has our backing and you better watch out.”
Inspired by V for Vendetta, protest leaders have circulated requests for people to take to the streets wearing the smiling white Guy Fawkes masked that were popularised by the film and which have since become synonymous with civil disobedience around the world.
Ms Lam banned face masks last month by invoking a colonial-era emergency law which had not been used for more than 50 years, but protesters have mostly ignored the ruling.
More than 3,300 people have been arrested since the protests began. In one bloody incident on Sunday night, a Mandarin-speaking man believed to be a Beijing supporter slashed two people with a knife and bit off part of a local politician's ear outside a mall. Police have arrested the assailant and two men who are accused of badly beating him before officers could attend the scene.
Ms Lam said she was disturbed by the mounting violence and growing number of injuries sustained during the protests.
Join our new commenting forum
Join thought-provoking conversations, follow other Independent readers and see their replies