A police officer was placed in a medically-induced coma after a suspect, fatally shot by police, used a metal chair to attack the officer during an arrest in Brooklyn, the NYPD said Friday evening.

It happened around 5:40 p.m. at a nail salon near Mother Gaston Boulevard and Sutter Avenue in Brownsville.

Police said the officer, a 21-year veteran of the NYPD, was expected to survive. Sources told NY1 that the officer had several fractures in his face and needed surgery.

The officer's partner, who has spent less than a year with the department, was released from the hospital for ringing in his ears.

According to the preliminary police investigation, the two officers were called to the salon after a 26-year-old man who came in to use a restroom started urinating in the middle of the store. Police discovered that the man had an active warrant for criminal mischief, and moved to arrest him.

During the arrest attempt, according to police officials, a man identified as 33-year-old Kwesi Ashun entered the salon and engaged in a "violent struggle" with police and struck an officer in the head with the chair. Police said one officer used his taser on the suspect but it did not stop the person.

An officer shot at the man six times, investigators said. Ashun was pronounced dead at the scene.

The man who urinated in the store, identified as Dewayne Hawkes, was placed under arrest. Charges against him are pending.

The identities of the officers was not confirmed Friday night.

People in the community denounced police for shooting the suspect.

"It was mayhem, children were running, families were afraid, my daughter was screaming," said Democratic Brooklyn Assemblywoman Latrice Walker, who was in the area at the time of the shooting. "I believe that this did not have to happen in this way. If there was a fight that was taking place, then it could have been handled differently. This young man did not have to die today … Our community is definitely traumatized today because this was a senseless death."

But NYPD officials defended killing the man, saying they would not tolerate violence towards police officers.

NYPD officials did not confirm if the officers had body cameras.

New Yorkers were advised to avoid the area as police investigated the shooting.

This was the fifth shooting involving an NYPD officer in less than two weeks.

The NYPD said an officer was shot during a struggle with an armed man in Harlem early Wednesday morning. That officer was struck in his ballistic vest and suffered minor injuries.

Last Thursday, police fatally shot a man in the Norwood section of the Bronx after he hit an officer with a car, according to investigators.

Eight days before that shooting, police fatally shot an armed man in Boerum Hill, Brooklyn. Officials said two plainclothes officers were on patrol at the Gowanus Houses when they came across a shooting in progress.

About four hours later, police shot an armed man in the shoulder at the East 225th White Plains subway station in the Bronx. That man was hospitalized and survived.

No police officers were hurt in the previous Brooklyn and Bronx shootings.