Hong Kong authorities have withdrawn an unpopular extradition bill that sparked months of chaotic protests that have morphed into a campaign for greater democratic change.

“I now formally announce the withdrawal of the bill,” secretary for security John Lee told the city’s legislature.

Pro-democracy legislators immediately tried to question him but he refused to respond and the assembly’s president said the rules did not allow for debate.

The long-expected scrapping of the bill was overshadowed by the drama surrounding the release from a Hong Kong prison of the murder suspect at the heart of the extradition case controversy.

Chan Tong-kai
Chan Tong-kai (Mark Schiefelbein/AP)

Chan Tong-kai, who completed a separate sentence for money laundering, told reporters after his release that he wanted to turn himself in to authorities in Taiwan, where he is wanted for the killing of his pregnant girlfriend, Poon Hiu-wing.

Taiwan announced on Tuesday it was willing to send a delegation to bring Chan back to the self-ruled island for trial, but Hong Kong rejected the offer, saying the suspect should be allowed to fly unaccompanied to Taiwan to turn himself in.

The controversy is rooted in the unwillingness of Hong Kong, a semi-autonomous Chinese region, to recognise the legitimacy of legal bodies in Taiwan, which the communist authorities in Beijing consider a breakaway province.

China has refused all contact with the administration of Taiwan’s directly elected President Tsai Ing-wen over her refusal to endorse Beijing’s contention that the island is Chinese territory awaiting annexation.

Tsai Ing-wen
Tsai Ing-wen (Chiang Ying-ying/AP)

That appears to have compelled Hong Kong to reject co-operation with Taiwan over Taipei’s insistence on a “mutual legal assistance” deal that would require their institutions to deal with each other on an equal basis.

Ms Tsai on Wednesday said that although Chan and the victim are from Hong Kong, Taiwan was willing to put him on trial if Hong Kong does not.

However, she said there was no possibility of Chan simply catching a flight to Taipei and insisted Taiwan would not sacrifice its sovereignty in handling the matter.

Chan, 20, returned to Hong Kong alone last year after travelling to Taipei with Ms Poon on vacation. Her body was found later packed in a suitcase and dumped in a field, while Chan made off with her bank card, mobile phone and other valuables.

Carrie Lam
Carrie Lam (Mark Schiefelbein/AP)

Hong Kong leader Carrie Lam had repeatedly cited Chan’s case as justification for the proposed amendments to extradition legislation, saying he could not be sent to the self-ruled island because there was no extradition agreement.

But the proposal stoked widespread fears that residents of Hong Kong, which has maintained its own independent courts since reverting from British to Chinese rule in 1997, would be put at risk of being sent into mainland China’s Communist Party-controlled judicial system.

Ms Lam was forced to announce last month that she would drop the bill in the face of fierce opposition.

The protests erupted in early June and snowballed into the city’s biggest political crisis in decades, expanding to demands for universal suffrage and an investigation into allegations of police abuses.

Amid the ongoing political chaos and street violence, Ms Lam’s future as Beijing’s pick to lead Hong Kong has been repeatedly questioned.

On Wednesday night, hundreds of pro-democracy protesters formed a human chain at the British Consulate in Hong Kong to rally support for their cause from the city’s former colonial ruler.

The event was organised ahead of a debate on Thursday in Britain’s Parliament on whether to offer British citizenship to Hong Kong people in light of the unrest that has gripped the city since early June.