Chinese President Xi Jinping has expressed a "high degree of trust" in Hong Kong's unpopular leader Carrie Lam as the two met after months of increasingly violent protests in the semi-autonomous city.
Xi's show of support follows speculation that Beijing was preparing to remove Lam as city authorities struggle to contain pro-democracy demonstrations that have rocked the financial hub.
Their meeting in Shanghai on Monday followed another weekend of violence in Hong Kong that was marked by a knife attack and the vandalising of an office of China's official Xinhua news agency.
Xi said Lam has "done a lot of hard work" and strived to stabilise the situation in Hong Kong, according to a Xinhua readout of their meeting.
"Xi voiced the central government's high degree of trust in Lam and full acknowledgement of the work of her and her governance team," the state news agency said.
"Ending violence and chaos and restoring order remain the most important task for Hong Kong at present," Xi said.
Lam told reporters on Tuesday that Xi expressed concern over the violence during a meeting the night before in Shanghai where they are both attending a trade fair.
"During a very short meeting with President Xi Jinping, he expressed care and concern about Hong Kong," she said.
He also "expressed support for the various actions taken by (the Hong Kong government)."
Lam sidestepped the question of whether her job might be in jeopardy.
The Xinhua report said that Xi also called for "effective efforts" to be made in improving people's lives and having dialogue with all sectors of society.
Willy Lam, a Hong Kong-based expert on Chinese politics, said Beijing is showing support for the city's chief executive "for the time being".
"It doesn't mean that they like Carrie Lam, or it doesn't mean that they think highly of her performance," he said.
"It's just that if they don't seem to be supporting her, then it will be impossible for her to carry out her duty in Hong Kong," Lam said, adding that Beijing wants Hong Kong to enact national security legislation that would give police more power to punish protesters.
But Carrie Lam could still be sacked within one year or during Beijing's annual legislative session in March, the expert said.
Unscheduled Beijing talks
China has run the city under a special "one country, two systems" model, which allows Hong Kong liberties not seen on the mainland, since its handover from the British in 1997.
But public anger has been building for years over fears that Beijing has begun eroding those freedoms, especially since Xi came to power.
Protesters have issued a list of demands, including universal suffrage and an investigation into abuses by police.
The Chinese Communist Party agreed at a leadership meeting last week to "improve" the way Hong Kong's chief executive and key officials are appointed and removed, but it provided no other details.
The party also warned it would "never tolerate" any challenge to "one country, two systems".
Lam was chosen in 2017 by a 1,200-strong committee stacked with Beijing supporters, a system that ensures Hong Kong's leader remains loyal to the central government but one that saddles the position with a pronounced democratic deficit.
Tam Yiu-chung, Hong Kong's sole representative to China's top lawmaking body, said the meeting between Xi and Lam would help allay the seething rumours about Beijing seeking to replace her.
"Xi must be very busy in Shanghai, where there were so many countries' leaders he had to meet, but he still made time for Lam, so the message of his care is clear," Tam said.
"Xi gave Lam an appropriate recognition but there isn't much praise in the report because after all the situations are yet to calm," Tam added.
The Financial Times, quoting unnamed figures briefed on the deliberations, reported last month that Beijing is drawing up a plan to replace her with an interim chief executive.
Beijing rejected the report as "a political rumour with ulterior motives".
Lam was originally supposed to return to Hong Kong after attending the second China International Import Expo in Shanghai this week, but on Sunday her office said she would meet with Chinese government officials in Beijing on Wednesday.
Claudia Mo, an opposition lawmaker in Hong Kong, said many democracy supporters would be dismayed to see Xi embracing Lam despite her lack of popularity after five months of unrest.
"Beijing is now bound to further tighten its grip over Hong Kong and make things even worse here," she told AFP.
"It's a puppet show."