Hong Kong leader Carrie Lam has announced the withdrawal of an extradition bill that triggered months of unrest.

The bill, which would have allowed extraditions to mainland China where courts are controlled by the Communist Party, triggered months of unrest and posed the gravest challenge to Chinese leader Xi Jinping since he came to power in 2012.

"The government will formally withdraw the bill in order to fully allay public concerns," Ms Lam said in a video statement released via her office. She confirmed the bill will be withdrawn once parliament reopens in October.

She also appealed for protesters to abandon violence and embrace a "dialogue" with the government.

"Let's replace conflicts with conversations and let's look for solutions. We must find ways to address the discontent in society and to look for solutions.

"Our foremost priority now is to end violence, to safeguard the rule of law and to restore order and safety in society."

Ms Lam warned protesters that the ongoing violence and challenges to Beijing's authority were putting Hong Kong in a "vulnerable and dangerous" position.

Pro-democracy activists voiced anger and determination to press on with their broader democracy campaign.

"Too little, too late," said Joshua Wong, a prominent activist who was arrested late last week as part of a police swoop of leading pro-democracy figures.

"We urge the world too to (be) alert this tactic and not to be deceived by HK and Beijing Govt. They have conceded nothing in fact, and a full-scale clampdown is on the way."

Read more:

Timeline of unrest in Hong Kong

What does Hong Kong want? And what will Beijing do about it?

The protests began as opposition to efforts by Ms Lam's government to introduce the legislation that would have allowed criminal suspects to be extradited to mainland China.

After millions of people took to the streets, Ms Lam suspended efforts to have the legislation passed but infuriated protesters by repeatedly refusing to formally withdraw it.

The movement also evolved into a much broader campaign to include demands for an independent inquiry into alleged police brutality against the protesters, and an amnesty for those arrested.

Another demand is for Hong Kongers to be able to directly elect their leaders - a major red line for Beijing that allows the city a limited degree of autonomy under a "one country, two systems" framework.

Read more:

Hong Kong leader Carrie Lam insists she will stay on

Hong Kong protesters disrupt travel at airport

Yesterday, Ms Lam insisted she has no intention of stepping down, after an audio recording emerged of her saying she wanted to quit and apologise for causing the unrest that has rocked the territory.

She was speaking after Reuters released an audio recording of her telling business leaders last week she wanted to step down and take responsibility for the unrest.

Ms Lam described the leaking of the audio recording as "quite unacceptable", and denied accusations that she or the government had orchestrated it.

"The conflict that I myself want to quit but cannot quit does not exist," she said.

Beijing has thrown its backing behind Ms Lam.

"We firmly support Hong Kong chief executive Carrie Lam in leading the SAR (special administrative region) government," Yang Guang, spokesman for the Hong Kong and Macao Affairs Office of China's central government, said at a press conference.