The shooting started just after midnight on Elton Avenue in the Melrose section.
Police say they initially observed two men spray painting graffiti and made a stop at 153rd and Third Avenue.
The men then got in the car and tried to flee when officers pulled them over and they took off on foot, authorities said.
Officers gave chase and caught up with one of the men when there was a struggle and they say the man pulled a semi-automatic hand gun on the officers and began firing.
"After a brief foot chase, one officer was able to grab one of the subjects. As the officer struggled with the man in an attempt to arrest him, the subject pulled out a semiautomatic handgun and fired at least three rounds at the officers," said NYPD Chief Terry Monahan.
There was an exchange of gunfire as the officers fired back, hitting the gun and the suspect multiple times.
"The suspects' gun appears to have been shot and damaged during the exchange of gunfire," Monahan added.
The 18-year-old suspect, who does not have any priors, is in critical condition.
Police are still searching for the second suspect. Officials reviewed body cam video from the officers, which they say does back up their statements. They also collected some surveillance video from the scene.
MORE NEWS: Video shows gas station holdup that ended in gunfire in Bronx
* More Bronx news
* Send us a news tip
* Download the abc7NY app for breaking news alerts
*Follow us on YouTube