An investigation is underway after a 17-year-old was shot by police in Brooklyn on Thursday.

The NYPD says officers saw a group fighting near Kings Highway and Rockaway Parkway around 3 p.m.

According to officials, when the officers approached the group, they noticed a female drop a bag and a 17-year-old boy fled police on a scooter immediately afterwards. 

The young woman was arrested, the NYPD says. 

Police say they when they chased the teenager, a 9 millimeter purple handgun fell out of his pocket near the corner of East 96th Street and Clarkson Avenue.

“These officers from the 67th Precinct stopped an innocent person from getting shot with that gun,” NYPD Chief of Patrol John Chell said at a news conference.

That’s when officers fired a round into his thigh, according to officials.

“The officer and the male were approximately face-to-face 15 feet apart, and they repeatedly asked him not to pick up that firearm, and that’s what he did and the officer had to defend himself,” Chell said.

Chell says one shot was fired to the suspect’s thigh and officers immediately applied a tourniquet to the suspect’s leg before he was taken to the hospital. 

This area in East Flatbush is part of a number of designated zones in the city, which the police department calls “summer violence reduction zones.” 

“Zones where we ask our officers to protect our community and protect it from street violence,” Chell said. 

The department says it’s working in reducing crime. 

According to NYPD statistics, crime in the 67th Precinct is down this year compared to the same time last year. 

“Zones that have contributed to a 30% decrease in shooting violence in the city this summer and it’s exactly where we ask our cops to be proactive and to protect this community and that’s what they did,” Chell said.