HONG KONG — Riot police officers fired tear gas and rubber bullets in downtown Hong Kong on Wednesday as they repelled tens of thousands of protesters who tried to swarm the city’s legislature in anger over proposed legislation that would allow extraditions to mainland China.

The street confrontation began on Wednesday afternoon when a small number of protesters stormed police barricades outside the Legislative Council and hurled bricks, bottles and umbrellas at the officers. The riot police responded by firing rubber bullets, beanbag rounds and tear-gas canisters at the protesters.

The large-scale clashes — rare in this financial hub — underscore both the deep-seated anger that protesters feel about the erosion of liberties in the territory and the police’s resolve to maintain order.

It was a sharp escalation of violence in a protest movement that took off in earnest on Sunday when an estimated one million people marched against the extradition bill and China’s growing influence in the territory. That march ended with small clashes in the early hours of Monday, but protesters began pouring back into the area around the legislature on Tuesday night ahead of a debate on the bill scheduled for the next day.