Police say a man caught breaking into a car in the Bronx was shot by an arresting officer and has been hospitalized.

Police Chief Terry Monahan said officers saw the man breaking into a white BMW at West 166th Street and Summit Avenue in the Bronx. The suspect produced keys that were not for that vehicle.

A video from bystanders shows the officers struggling with the man, who was on the ground next to a car with a broken rear window. He was yelling, "This is my car, I know my rights."

An officer then shoots him at close range as many people recorded. The man was taken to a hospital in stable condition.

The cop is heard shouting "What's wrong with you man" after the suspect was shot.

Monahan said that body cameras worn by the two officers showed the suspect saying, "I have a gun (expletive) die." Audio from the body cameras shows one of the officers saying that the suspect pulled a gun at the officer's chest, according to police.

"When you're looking from a distance, you're not seeing what's happening in that real close quarter," Monahan said.

Monahan said a loaded 9mm Ruger was recovered at the scene. It wasn't immediately clear whether if, or when, the bodycam footage will be released.

Two officers were taken to a hospital for treatment of ringing in their ears.

The Associated Press contributed to this report.