Police said at 6:20 p.m., a 32-year-old man walked up to another man who was sitting outside a convenience store and fired shots at him, striking him multiple times at close range, police said.
Two plainclothes NYPD officers were driving by on 125th Street and witnessed the entire shooting.
Both officers immediately got out of the car, one immediately rendered aid to the victim while the other officer ran after the shooter, police said.
The shooter ran northbound on Amsterdam Avenue and as he rounded the corner, a third male ran into the intersection and discharged a firearm at the original shooter.
Polic said as the third male fired his firearm in the middle of the intersection the officer rounded the corner and also fired his weapon.
The original shooter was struck once, but police say it was not clear whose shot struck him and is still under investigation.
Bullets from either the third male or the officer went through the glass of Medrite Urgent Care. No bystanders were injured.
Both the victim outside the convenience store and the shooter, who was struck with a bullet, were taken to St. Luke's Hospital, police said.
The third male who fired shots in the middle of the intersection on Friday night is still at large, police said.
Police said the shooter outside the convenience store fired a gun into a crowd of people just a few blocks away in an incident in June of 2015.
He was convicted of attempted murder from that incident and was released from jail in 2025 and was on parole until August 2029, according to police.
Police said he has 11 previous arrests, including several other violent felonies.
Officers were not wearing body cameras because they were on their meal break when they responded, but police said the shooting was captured on surveillance video.