Image copyright Getty Images Image caption The extradition bill sparked months of protest but its withdrawal is unlikely to quell unrest

Hong Kong's legislature has formally withdrawn a controversial extradition bill that has sparked months of unrest.

The bill - which would have allowed for criminal suspects to be extradited to mainland China - prompted outrage when it was introduced in April.

Hundreds of thousands of people took to the streets and the bill was eventually suspended.

But protesters have continued regular demonstrations, which spiralled into a wider pro-democracy movement.

It is the worst crisis for Hong Kong since the former British colony was handed back to China in 1997.

It has also presented a serious challenge to China's leaders in Beijing, who have painted the demonstrators as dangerous separatists and accused foreign powers of backing them.

The proposed bill would have allowed for Hong Kong to extradite criminal suspects to places it does not have an extradition treaty with, including mainland China, Taiwan and Macau.

Critics of the planned law had feared extradition to mainland China could subject people to arbitrary detention and unfair trials.

The bill's formal withdrawal meets only one of five key demands emphasised by some protesters, who have often chanted "five demands, not one less" in Hong Kong's streets.

The others are:

For the protests not to be characterised as a "riot"

Amnesty for arrested protesters

An independent inquiry into alleged police brutality

Implementation of complete universal suffrage

Connie, a 27-year-old protester, told Reuters news agency the move was "too little, too late".

"There are still other demands the government needs to meet, especially the problem of police brutality," she said.

Carrie Lam, the embattled Hong Kong leader, has insisted that other demands by protesters are outside her control.

The protests - which began peacefully - now often descend into violent running battles between Hong Kong police and hardcore demonstrators who have vandalised shops and hurled petrol bombs at security forces.

Police have used water cannon, tear gas and rubber bullets in response. Live rounds have been fired on a few occasions, and an 18-year-old was shot by police in the chest on 1 October.

Media playback is unsupported on your device Media caption How Hong Kong got trapped in a cycle of violence

The Financial Times newspaper reports that China's government is drawing up plans to remove Ms Lam, a figure loathed by protesters whom Beijing has thus far stood by.

If Chinese President Xi Jinping approves the plan, the paper says, she will be replaced by an interim chief executive after calm returns to Hong Kong.

Ms Lam's office told the BBC: "We do not comment on speculation." China's foreign ministry said the FT report was "a political rumour with ulterior motives".

Separately on Wednesday, Hong Kong released the murder suspect whose case led to the extradition bill in the first place.

Chan Tong-kai is accused of murdering his pregnant girlfriend in Taiwan last year before fleeing back to Hong Kong.

But Hong Kong and Taiwan do not have an extradition treaty, and his case was cited when the government proposed amending the law.