An NYPD detective sustained an arm injury after a shooting in Brownsville Thursday afternoon, the department said.

Police believe the gunman, on foot, was targeting a white vehicle driving through the intersection of Pitkin Avenue and Legion Street. The NYPD-marked vehicle containing two uniformed officers from the 73rd Precinct was caught in the crossfire and a driver-side window was shattered, police Commissioner Keechant Sewell said at a press conference Thursday evening.

It was originally unclear if the detective was injured by a bullet or broken glass, according to Assistant Chief Joseph Kenny of the NYPD's detective bureau.

"It's still being determined at this time at the hospital," Kenny said.

The detective was transported to Kings County Hospital, Sewell said.

The hospital later determined that the officer's left arm injury was caused by shattered glass from the car window, not the bullet itself, police said Friday morning.

Police say that officer has been released from the hospital.

The uniformed officers exited the vehicle and pursued the gunman through a nearby courtyard, but did not apprehend him. Police recovered what they believe is a 9 millimeter Taurus handgun in the courtyard, Kenny said.

"We're going to do everything possible to find the person who is guilty of this shooting," Mayor Eric Adams pledged at the press conference.

The detective was a neighborhood coordination officer, officials said. Known as NCOs, those officers are at the forefront of the NYPD's neighborhood policing strategy, with the goal of building relationships between local police officers and community members.