Image copyright Reuters Image caption The protests in Hong Kong began in response to a bill championed by Ms Lam

China's President Xi Jinping has told embattled Hong Kong leader Carrie Lam that the central government has a "high degree of confidence" in her, according to Chinese state media.

There were reports last week of Beijing planning to replace Ms Lam, after months of anti-government protests that have at times crippled Hong Kong.

But Mr Xi reportedly expressed his full support at a meeting in Shanghai.

The protests began against an extradition bill put forward by Ms Lam.

She championed the proposed law, which would have allowed criminal suspects in Hong Kong to be sent to mainland China for trial.

The bill sparked fears Hong Kong's freedoms were being eroded, and led to widespread protests, including one with a reported turnout of close to two million.

Ms Lam eventually withdrew the bill, but protests have continued, with activists demanding an independent inquiry into alleged police brutality, and democratic reform.

China's state news agency Xinhua published pictures of the two leaders shaking hands, and reported that Mr Xi had praised Ms Lam for her efforts to quell clashes in the territory.

"The central government has a high degree of confidence in you," he was quoted as saying, adding: "Stopping the storm and restoring order remains the most important task in Hong Kong."

The wave of protests continued this past weekend, with riot police spraying tear gas into crowds of demonstrators in Taikoo district, a residential area.

On Sunday, in the same district, a man stabbed four people and bit off part of a pro-democracy local councillor's ear, after a political argument about the protests.

With no end to the demonstrations in sight, China's leaders signalled for the first time last week they were prepared to make changes to the way the mainland administered Hong Kong.

Shen Chunyao, the director of the Hong Kong, Macau and Basic Law Commission, told reporters officials were looking at ways to "perfect" how Hong Kong's chief executive was appointed and removed. He did not elaborate on the exact nature of the proposed changes.

Hong Kong's leader, the chief executive - currently Ms Lam - is elected by a 1,200-member election committee, a mostly pro-Beijing body chosen by just 6% of eligible Hong Kong voters.

Image copyright Getty Images Image caption Riot police have regularly fired tear gas in an attempt to disperse protesters

Image copyright Getty Images Image caption Protesters began carrying gas masks and umbrellas to defend themselves

Once a British colony, Hong Kong was handed back to China in 1997. It has its own judiciary and a separate legal system from mainland China, and rights mainland Chinese citizens do not enjoy, such as freedom of assembly and freedom of speech.

But human rights groups say some of those freedoms are being curtailed, and accuse China of meddling in the territory's affairs, citing legal rulings that have disqualified pro-democracy legislators.

Artists and writers in the territory also say they are under increased pressure to self-censor - and a Financial Times journalist was barred from entering Hong Kong after he hosted an event that featured an independence activist.

The Chinese government said in 2014 it would allow Hong Kong voters to choose their leaders from a list approved by a pro-Beijing committee. But critics called the proposal a "sham democracy" and it was voted down in Hong Kong's legislature.

In 28 years' time, in 2047, the Basic Law - which grants Hong Kongers their freedoms - expires, and what happens to the territory's autonomy after that is unclear.