Hong Kong Chief Executive Carrie Lam announced Tuesday that legislation to allow suspects to be sent to mainland China to face trial had failed after weeks of massive protests.

The proposed bill sparked some of the largest demonstrations in the city's history, with as many as 2 million of Hong Kong's 7 million residents taking to the streets. Some of the protests turned violent as recently as last week, when protesters broke into and vandalized Hong Kong's Legislative Council building.

Protests on Sunday were calmer in comparison, with organizers estimating that more than 230,000 people took part.

Lam, speaking through an interpreter in a nationally televised address, said she took "full responsibility" for what she called "a total failure."

Switching to English, in which she is fluent, she said, "The bill is dead."

She said it wouldn't be revived.

Hong Kong Chief Executive Carrie Lam announces withdrawal of a controversial extradition bill at government headquarters on Tuesday. Anthony Wallace / AFP - Getty Images

Lam denied that her government had ever called the protesters "rioters," but she refused to accept calls for amnesty for any protesters who broke the law, calling acts of violence and vandalism during the demonstrations "not acceptable."

And she promised to listen more closely to the Hong Kong people, saying she hoped that "this will extend to other officials of the Hong Kong government."

Hong Kong became a special administrative region of China in 1997. Many residents have expressed fear that their rights are being eroded under Beijing's rule.

The legislation that sparked the recent protests would have amended a bill to simplify case-by-case arrangements to allow extradition to jurisdictions beyond the 20 with which Hong Kong already has extradition treaties. Among the proposed new jurisdictions were mainland China and Taiwan.

Opponents questioned the fairness and transparency of the Chinese court system and warned that Chinese security forces could trump up charges against political opponents.