Hong Kong’s leader Carrie Lam insisted she still had the backing of the Chinese leadership on Tuesday after surprise talks with president Xi Jinping in Shanghai.

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.”

Hong Kong protesters out in force after months of turmoil: In pictures Show all 32 1 /32 Hong Kong protesters out in force after months of turmoil: In pictures Hong Kong protesters out in force after months of turmoil: In pictures A protester throws a stone into a building at Hong Kong Polytechnic University on 11 November Reuters Hong Kong protesters out in force after months of turmoil: In pictures Police patrol the streets of Hong Kong the day after an officer shot a protester during a protest on 11 November EPA Hong Kong protesters out in force after months of turmoil: In pictures Riot police stand guard during a protest against police brutality in Hong Kong on 27 October EPA Hong Kong protesters out in force after months of turmoil: In pictures Protesters carry traffic cones to build a barricade during anti-government protests in Causeway Bay, Hong Kong on 11 November Reuters Hong Kong protesters out in force after months of turmoil: In pictures Protesters use obstacles and bricks to block a road in Hong Kong on 11 November AP Hong Kong protesters out in force after months of turmoil: In pictures Graffiti on a window smashed by student protesters in Hong Kong Polytechnic University AP Hong Kong protesters out in force after months of turmoil: In pictures Protesters carry US and British flags during a demonstration in Hong Kong on 11 November Reuters Hong Kong protesters out in force after months of turmoil: In pictures A protester throws a bottle of water as he is shrouded in tear gas during a demonstration in the Tsim Sha Tsui district of Hong Kong on 27 October Reuters Hong Kong protesters out in force after months of turmoil: In pictures Journalists take pictures of police officers as they move to disperse protesters in Hong Kong on 27 October Reuters Hong Kong protesters out in force after months of turmoil: In pictures An man lies injured after being attacked by protesters who suspected him of being an undercover police officer on 27 October EPA Hong Kong protesters out in force after months of turmoil: In pictures A man runs among tear gas during a protest in Hong Kong on 27 October Reuters Hong Kong protesters out in force after months of turmoil: In pictures Protesters gather on a field in the Tsim Sha Tsui district of Hong Kong on 27 October Reuters Hong Kong protesters out in force after months of turmoil: In pictures Pro-democracy protesters turn away from a fire lit outside the Causeway Bay Mass Rapid Transit (MTR) station in Hong Kong on 4 October Getty Hong Kong protesters out in force after months of turmoil: In pictures People rest near rows of riot police officers during a protest in Mong Kok, Hong Kong on 27 October Reuters Hong Kong protesters out in force after months of turmoil: In pictures Pro-democracy protesters hold umbrellas as police fire tear gas at them ouside Tai Koo MTR station in Hong Kong on 3 October Getty Hong Kong protesters out in force after months of turmoil: In pictures Hong Kong police fire a water cannon from the central government office at protesters during a mass rally on the 70th anniversary of the founding of communist China on October 1 AFP/Getty Hong Kong protesters out in force after months of turmoil: In pictures Protesters burn a Chinese national flag during a mass rally on the 70th anniversary of the founding of communist China on 1 October AFP/Getty Hong Kong protesters out in force after months of turmoil: In pictures Protesters remove signs celebrating the 70th anniversary of the founding of communist China during a mass rally in Hong Kong on 1 October AFP/Getty Hong Kong protesters out in force after months of turmoil: In pictures Cardboard boxes set alight by protesters burn in the streets of Hong Kong during a mass rally on the 70th anniversary of the founding of communist China on 1 October EPA Hong Kong protesters out in force after months of turmoil: In pictures An anti-China banner has been placed in a barricade during a mass rally on the 70th anniversary of the founding of communist China on 1 October EPA Hong Kong protesters out in force after months of turmoil: In pictures A pro-democracy protester runs away after police fire a tear gas canister in Hong Kong's Wong Tai Sin district on October 4 Reuters Hong Kong protesters out in force after months of turmoil: In pictures Protesters run after police fire tear gas during a mass rally on the 70th anniversary of the founding of communist China on 4 October AFP/Getty Hong Kong protesters out in force after months of turmoil: In pictures Pro-democracy protester take cover after police fire a tear gas canister in Hong Kong's Wong Tai Sin district on 4 October Reuters Hong Kong protesters out in force after months of turmoil: In pictures The rally comes after months of protests on the streets of Hong Kong which began in oppposition to a proposed extradition bill EPA Hong Kong protesters out in force after months of turmoil: In pictures The extradition bill would have allowed the government to extradite people to China if they were facing certain criminal charges AFP/Getty Hong Kong protesters out in force after months of turmoil: In pictures Opposition to the bill stems from the fear that the Chinese government would abuse this power for political or commercial reasons EPA Hong Kong protesters out in force after months of turmoil: In pictures Protesters soon came to demand greater freedom and universal suffrage under the One Country, Two Systems principle AFP/Getty Hong Kong protesters out in force after months of turmoil: In pictures Protesters are wearing black to symbolise opposition to China as they take to the streets in a "day of grief" while the Chinese state celebrates the 70th anniversary of its communist founding AFP/Getty Hong Kong protesters out in force after months of turmoil: In pictures A protester charges forward holding umbrellas as a mass rally breaks out in violence in Hong Kong on 1 October AFP/Getty Hong Kong protesters out in force after months of turmoil: In pictures A protester pours water on a tear gas canister fired by police during a mass rally on the 70th anniversary of the founding of communist China on 1 October Reuters Hong Kong protesters out in force after months of turmoil: In pictures A protester carries a vandalised Chinese flag through Hong Kong during a mass rally on the 70th anniversary of the founding of communist China on 1 October EPA Hong Kong protesters out in force after months of turmoil: In pictures Protesters carry a banner that denounces the celebration of the 70th anniversary of the founding of communist China on 1 October EPA

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.