THE BRONX (PIX11) — Police fatally shot an armed man in the Bronx on Thursday, NYPD Chief of Detectives James Essig said.

The man had been involved in a fight inside a bodega at East Gun Hill Road and Hull Avenue before the deadly shooting, officials said. He has not yet been publicly identified.

Plainclothes officers from the Queens Warrants Squad had been parked in an unmarked vehicle in front of the bodega before the shooting, officials said. They were there for an unrelated investigation.

Around 11:30 a.m., a 29-year-old man double parked a Lexus and headed into the bodega, Essig said. Once inside, he engaged in a violent struggle with a 21-year-old man. The fight was caught on tape. The younger man had a gun.

The 29-year-old man, who had a knife, stabbed the 21-year-old man, officials said. The knife-wielding older man fled, but the younger man chased after him and fired at point-blank range into the Lexus.

A sergeant and two detectives confronted the 21-year-old man and fired numerous times, striking the man. He was taken to a hospital where he died.

The 29-year-old man, who’d fled the scene, suffered a graze wound to the head, police said. He was found in a barber shop and was taken to a hospital for treatment.

Based on the preliminary investigation, neither man has any connection to the bodega. Police said the motive for the fight was unclear. Officers recovered a knife and a gun during the investigation.

There was no body camera video of the shooting, officials said. One officer fired two rounds and another officer fired 10 rounds.

Police asked people to avoid the area of East Gun Hill Road and Hull Avenue. The department advised people to expect traffic in the area and consider alternate routes.

Earlier in the week, an NYPD officer shot a machete-wielding man in Brooklyn.