ELMHURST, Queens (WABC) — A 15-year-old is charged with shooting the 17-year-old son of an NYPD officer in the arm near Maspeth High School Wednesday.

The shot teen was not the intended target.

But a boy he was walking with on Grand Avenue, who detectives believe was the target of the gunfire, was able to provide them with the identity of the suspect.

Detectives went to that boy’s Queens home and picked him up Wednesday night.

They had previously detained two other 15-year-olds for questioning, but released them after learning this teen’s identity.

The 15-year-old is charged with attempted murder, assault, criminal possession of a weapon and reckless endangerment

The shot teen is a student at Maspeth High School, where portable metal detectors arrived this morning. There was no scanning at the school yesterday.

He was treated at Elmhurst Hospital for a non life threatening injury to his left arm.