NEW YORK (PIX11) — A 17-year-old boy is accused of shooting an off-duty NYPD officer in the head while he was sleeping in his car in Manhattan nearly a year ago, authorities said Thursday.

The teen was indicted on Monday on charges of assault, criminal possession of a weapon, and reckless endangerment in connection to the Jan. 1 incident, according to NYPD Chief of Detectives James Essig. He was arrested Thursday morning.

“I’m doing pretty good. Just glad to be alive,”  NYPD Officer Keith Wagenhauser said at a press conference announcing the arrest.

Wagenhauser was sleeping in his car in the rear parking lot of the 25th Precinct on 119th Street in East Harlem when he was struck at around 6:15 a.m., police said. The officer suffered trauma to the left side of his head and was awakened by blood on his face and the rear passenger window shattered, Essig said.

Investigators allege the teen fired a gun from the rooftop of the King Towers NYCHA complex on West 112th Street at 6:14 a.m., according to Essig. The teen was caught on surveillance video loading the gun and a .45 caliber shell casing was found on the building rooftop, police said.

Wagenhauser was taken to the hospital where he underwent surgery for a fractured skull, officials said at the time. Bullet fragments were removed from the gunshot wound.

The cop had just finished an eight-hour shift around 2:30 a.m. and was scheduled to work a 7 a.m. shift later that morning, NYPD Commissioner Keechant Sewell previously said.

“This was an exhaustive investigation,” Essig said.