HONG KONG — The 30,000-member Hong Kong police force was long known as “Asia’s finest.” Then with the world watching, they tear-gassed and beat largely peaceful demonstrators and fired rubber bullets at them. Some officers appeared to hide their badges to avoid identification.

Now the force is struggling to salvage a reputation blighted by its behavior in the June 12 protests over a proposed extradition law that convulsed Hong Kong, the semiautonomous Chinese territory.

Faced with public fury over their crowd-control tactics, the police retreated and watched as thousands of young demonstrators besieged their headquarters for 15 hours last week, barricading the exits, throwing eggs and spraying graffiti on the walls.

Officers ducked their heads as protesters aimed laser pointers at them, and a police spokeswoman who urged the demonstrators to leave was drowned out by jeering.