NEW YORK (CNN) -- Two New York City police officers were shot and killed ambush-style Saturday as they sat in their patrol car in Brooklyn, according to two law enforcement sources.
Both officers were shot in the head, one of the sources said. Few other details were available.
They had been rushed to a hospital in critical condition, said police spokesman Sgt. Lee Jones.
The families of the fallen officers arrived at Woodhull Medical Center on Saturday afternoon, as dozens of police officers gathered in a show of support.
The alleged shooter was found dead in a nearby subway station from a self-inflicted gunshot wound, according to a law enforcement official.
The shooting occurred near Myrtle and Tompkins avenues in the Bedford-Stuyvesant section of Brooklyn.
Neighborhood residents were jolted by the shootings.
"This can't happen. If you mad at somebody, be mad at the person that you are mad at. Now, we have two families that (are) missing somebody for the holidays," Shaniqua Pervis told CNN affiliate WABC.
"Where is your humanity? I know it's a war going on and shoutout to Eric Garner's family and everybody else who lost somebody, but you're not at his house, on his lawn. This is two (officers). You don't even know if (they were) good or bad. I don't condone this, and I'm not with it."
The woman was referring to the controversial July death of an unarmed black man after New York police officers on Staten Island wrestled him to the ground, with one of the officers wrapping his arm around Garner's neck in a chokehold.
A grand jury's decision not to indict the police officer in the Garner case, as well as a separate grand jury's refusal to indict an officer in a controversial police shooting in Ferguson, Missouri, led to nationwide protests against the police.
Tensions between the community and police have heightened since the deaths.
So far, police have not commented on the motive for the Brooklyn shootings, except to say the officers were not engaging the shooter in any way when they were shot.