Investigators believe the shooter also damaged windows in the same neighborhood with a pellet gun earlier this summer.
Officials say the officer was getting out of an unmarked police vehicle when she felt pain in her lower back.
Mayor de Blasio was not home at the time of the 7:15 p.m. shooting, and sources said it did not appear the suspect knew he was firing at police.
The officer was treated by Lenox Hill Hospital and her injuries are considered minor. 19-year old Michael Veritzky is charged with Assault on a Police Officer with a Deadly Weapon, Reckless Endangerment, Criminal Possession of a Forged Instrument, Criminal Possession of a Weapon 4, and Criminal Mischief.
The two individuals were taken into custody near 170 East End Avenue, a condo building.
Cops quickly entered Verbitsky’s building, where they questioned his girlfriend, Gabrielle Gleyberman, 19, inside a 10th-floor apartment, sources said.
Veritsky, who has six prior arrests in NYC, first confessed that he shot at the officer, but as the questioning progressed he stopped cooperating and asked for an attorney.