Hundreds of thousands of protesters flooded the streets of Hong Kong on Sunday to demonstrate against proposed amendments to an extradition bill, which would allow the transfer of those accused of crimes to mainland China.

The massive demonstration took place just three days before Hong Kong's full legislature considers the bill, which critics fear would let China target political opponents in the former British colony and could undermine its judicial independence.

The Sunday protest was one of the biggest in recent Hong Kong history. Police estimated the crowd at 240,000; organizers said it was closer to 1 million.

After around 10 hours of peaceful protest, tensions rose when a group of protesters stormed the barriers at the government headquarters. The group briefly made it to the lobby, but police responded with batons and pepper spray.

Here's a closer look:

Why is the bill controversial?

Hong Kong was a British colony until 1997 when it was handed over to China as a territory. However, the city is still semi-autonomous, retaining its own political, social and legal systems as part of the "one country, two systems" agreement.

Opponents say the extradition bill will allow China to increase control over Hong Kong's legal system and will target political dissidents, who critics fear could then face unfair trials. Proponents, namely the city's government, say the revised bill will help fight crime and maintain order.

Hong Kong currently limits extraditions to jurisdictions with which it has prior agreements with, or on a case-by-case basis. China was excluded because of concerns over its troubled history with legal independence and human rights.

The amendments would allow Hong Kong courts to extradite people to jurisdictions even lacking this prior agreement. Despite widespread opposition, Hong Kong's Chief Executive Carrie Lam has championed the legislation.

More:20 years on, freewheeling Hong Kong is more like the rest of repressed China

Who are the protesters?

People from all walks of life marched in the streets Sunday, from toddlers to the elderly, wearing white to symbolize the color of light, according to the South China Morning Post.

“If I didn’t come out now, I don’t know when I would have the chance to express my opinion again,” said Kiwi Wong, a 27 year-old protester. “Because now we’ve got to this stage, if you don’t come out to try to do what you can, then it will end up too late, you won’t be able to say or do anything about it.”

Retired primary school teacher Pun Tin-chi expressed his frustration with officials, telling the Post the amendments will prevent Hong Kong from becoming a safe haven for criminals.

“I don’t even know what I can say to these officials," Tin-chi said. "All I can say is, I am already 70 years old and I cannot believe I am witnessing how they have been telling lie after lie."

Activist Lee Cheuk-yan, a former Hong Kong legislator, said the autonomy of Hong Kong needs to be protected and noted potential economic drawbacks to the revisions.

"The people of Hong Kong want to protect our freedom, our freedom of speech, our rule of law, our judicial system and also our economic foundation, which is welcome to international investors,” Cheuk-yan said. "If international investors lose confidence in Hong Kong because of this evil bill, then Hong Kong, economically, would also be destroyed.”

More:U.S. Secretary of State Mike Pompeo 'smears' China on 30th anniversary of Tiananmen Square protests

What is the government response?

In a statement late Sunday, the government acknowledged the rights of the protesters to voice their criticisms.

"We acknowledge and respect that people have different views on a wide range of issues,” the statement said. “The procession today is an example of Hong Kong people exercising their freedom of expression within their rights as enshrined in the Basic Law and the Hong Kong Bill of Rights Ordinance.”

Lam's government claims the revisions are needed in order to close legal loopholes. It will formally put forward the amendments of the bill on Wednesday and hopes for approval by the end of the month.

Contributing: The Associated Press