A Camden County Sheriff’s Office investigator was cleared of any wrongdoing for shooting a teenager in 2018 after authorities say he accidentally pulled his gun’s trigger while trying to flip on the weapon’s flashlight.

The Camden County Prosecutor’s Office declined to press any charges against the unidentified officer for the August 2018 shooting of a 17-year-old in Camden, the office said in a statement. After a more than year-long investigation, the office said the incident would not see a grand jury and the shooting was within the parameters of a lawful use of force.

“The undisputed facts indicate the investigator’s conduct was justifiable under the law, and taking all of the facts into account, all of the evidence supports the conclusion that the discharge was accidental,” the statement said.

The teen was wounded Aug, 22, 2018 during a chaotic drug raid in a basement apartment, and a tense standoff that ended with a teen bystander injured with a gunshot wound.

Officers stormed the 2nd Street apartment with a no-knock warrant to conduct a drug raid. When the officer entered the apartment, he encountered a man in the hallway who refused to comply with the officer’s commands to get on the ground and not approach him, the statement said.

When the officer took out his gun to use the attached flashlight and distract the uncooperative man, he pulled the trigger of the gun, the statement said. The flashlight was attached to the frame of the gun, directly in front of the gun’s trigger guard.

The man was not hit by the shot, but it grazed the arm of a 17-year-old male behind him in the hallway, the statement said.

The unidentified man who the officer was trying to apprehend was charged with multiple crimes, including drug distribution and firearm possession charges.

Rodrigo Torrejon may be reached at rtorrejon@njadvancemedia.com. Follow him on Twitter @rodrigotorrejon.

Find NJ.com on Facebook. Get the latest updates right in your inbox. Subscribe to NJ.com’s newsletters.