Update at 8:30 p.m. ET

Two New York police officers were ambushed and fatally shot while sitting in their patrol car in Brooklyn's Bedford-Stuyvesant neighborhood Saturday. The suspected gunman has died of a self-inflicted gunshot wound.

In a press conference, New York City Police Commissioner William Bratton said the officers, Wenjian Liu and Rafael Ramos, were killed with "no warning, no provocation." They were shot in the head by a gunman standing by the passenger window, the commissioner said; the shooter, identified as Ismaaiyl Brinsley, then entered a nearby subway station and killed himself.

The gunman shot a woman in Baltimore on Saturday morning before traveling to New York City, Bratton said. Baltimore police sent a "warning flier" to the NYPD, but the police commissioner said the warning fax arrived at approximately the same time the shooting occurred.

Bratton said the shooting didn't appear to be an act of terrorism. The police say they are investigating the gunman's motives, and as part of their investigation they will look into anti-police Instagram posts which have been attributed to the suspect.

Both Bratton and Mayor Bill de Blasio emphasized that anyone who sees or hears threats against police, in person or over social media, should report the threat to the authorities.

Attorney General Eric Holder called the killings "an unspeakable act of barbarism." The Rev. Al Sharpton announced a Sunday press conference with the widow and mother of Eric Garner "denouncing the killing of the two NYPD officers" and offering prayers for the families of the victims.

The AP described the scene after the shooting:

"A block from the shooting site, a line of about eight police officers stood with a German shepherd blocking the taped-off street. Streets were blocked even to pedestrians for blocks around."Derrick Thompson, who lives nearby, said the shooting happened across from the Tompkins Houses public housing development." 'I was watching TV, and then I heard the helicopters,' Thompson said. 'I walked out, and all of a sudden — this.' "

Copyright 2016 NPR. To see more, visit http://www.npr.org/.