A 14-year-old boy has been detained in the shooting of a Los Angeles police officer who was driving to work in a South-Central neighborhood early Thursday morning.

The plain-clothes officer was driving in an unmarked vehicle to the Newton Community Police Station when the shooting occurred about 5 a.m., Los Angeles Police Department Assistant Chief Robert Marino told KTLA.

Just a few blocks from the station, the officer realized the glass of his vehicle had shattered and he felt a sharp pain in his head, Marino said.

The 20-year veteran of the Police Department continued to drive to work, then ran across the street to seek treatment at a nearby fire station.

“At this point and time, it appears he does have a graze wound to the back of his head,” Marino said.

The unidentified officer is expected to be OK and was with family and fellow officers at the hospital, Marino said.

A juvenile in possession of a handgun was detained near the shooting location and has been taken into custody, Marino said.