HONG KONG — Police in Hong Kong defended an officer's decision to shoot a protester at close range during violent clashes, saying it was a matter of life or death.

The shooting Tuesday came as the semiautonomous territory saw police clash with tens of thousands of black-clad protesters demanding that the Communist Party "return power to the people," overshadowing celebrations in China of the 70th anniversary of Communist rule.

Police confirmed that an 18-year-old man, identified as Tsang Chi-kin, a student at Tsuen Wan Public Ho Chuen Yiu Memorial College, was shot in the chest during an altercation with an officer and was taken to Hong Kong's Queen Elizabeth hospital. It was the first time a protester had been hit by a live round during the 17 weeks of civil unrest.

A hospital spokesperson told NBC News that Tsang underwent surgery and was recovering in intensive care. Police said he had been arrested.

People hold up signs and a mobile phone as they gather at West Kowloon Law Courts Building to show their support to 96 anti-government protesters who were arrested days ago in Hong Kong. Athit Perawongmetha / Reuters

Deputy Police Commissioner Tang Ping-keung defended the police officer's actions during a press conference Wednesday, saying the officer had acted in a "lawful and reasonable" manner while facing "imminent danger."

"His life was hanging on a thin line and there was no other choice to use other types of force or other types of weapons," Tang said.

Asked why police didn't increase the use of force gradually, he said it was a "life and death situation."

Police played video footage, captured by various outlets, from the moments leading up to the shooting. Officials explained that their officers were outnumbered and one officer was being beaten by at least 10 protesters after having fallen.

The officer who shot the protester had come to his colleague's aid, standing outside on the edge of the scuffle, when he raised his weapon. The protester was wielding a metal rod at the officer when he pulled the trigger, officials said.

Tang said a more thorough investigation into the shooting would be conducted.

Local politicians criticized police over the incident. "The Hong Kong police have gone trigger-happy and nuts," pro-democracy lawmaker Claudia Mo told The Associated Press. "The sensible police response should have been to use a police baton or pepper spray to fight back. It wasn't exactly an extreme situation, and the use of a live bullet simply cannot be justified."

Amnesty International, Britain's foreign secretary, Dominic Raab, and other Hong Kong groups also condemned the use of live ammunition. Hundreds of college students held a strike Wednesday in honor of their wounded classmate, chanting anti-police slogans and demanding accountability.

The shooting risks inflaming already tense relations between the public and police.

Among the core demands of demonstrators — who began protesting in June over a now-withdrawn extradition bill — is greater police accountability and an investigation into allegations of excessive use of force.

Anti-government protesters march at Central district in Hong Kong, Wednesday. Felipe Dana / AP

Thirty police officers were injured and five remain in hospital on Tuesday, officials said. Among the more severely injured was an officer who sustained third-degree burns after being hit with corrosive fluids.

The number of injured civilians was not provided. Police said 1,400 rounds of tear gas were deployed, along with 900 rubber bullets, 190 bean bags and 230 sponge grenades.

A total of 269 people were arrested, ranging from ages 12 to 71.

Damage to the city was also significant, police said, with motorcycles were set ablaze, resulting in explosions, and many buildings and businesses vandalized.

Despite the escalation, Tang maintained that police were still upholding order in Hong Kong. "We are well prepared, confident and determined to bring Hong Kong back on the right track," he said.

Veta Chan reported from Hong Kong, and Linda Givetash from London.