NEW YORK: An African American gunman who vowed online to shoot two “pigs” in retaliation for the police chokehold death of Eric Garner ambushed two New York City officers in a patrol car and fatally shot them in broad daylight Saturday before running to a subway station and killing himself, authorities said.

President Barack Obama “unconditionally” condemned the murders, saying in a statement: “Tonight, I ask people to reject violence and words that harm, and turn to words that heal.”

“Today, two of New York’s finest were shot and killed with no warning, no provocation,” said an emotional New York Police Commissioner Bill Bratton.

Police named the shooter as 28-year-old Ismaaiyl Brinsley, who shot and seriously wounded his ex-girlfriend in Baltimore early Saturday before driving to Brooklyn to murder the two officers.

Brinsley wrote on an Instagram account: “I’m putting wings on pigs today. They take 1 of ours, let’s take 2 of theirs,” two city officials with direct knowledge of the case confirmed for The Associated Press. He used the hashtags Shootthepolice RIPErivGardner (sic) RIPMikeBrown.

The two uniformed officers, one a newlywed, were shot in the head through the window of their patrol car in broad daylight in Brooklyn on Saturday in an attack that left America’s biggest city reeling just days before Christmas.

The officials, a senior city official and a law enforcement official, weren’t authorized to speak publicly on the topic and spoke on condition of anonymity.

Police said Brinsley approached the passenger window of a marked police car and opened fire, striking Officers Rafael Ramos and Wenjian Liu in the head. The officers were on special patrol doing crime reduction work in Brooklyn.

“They were, quite simply, assassinated — targeted for their uniform,” said Police Commissioner Bill Bratton, who looked pale and shaken at a hospital news conference.

The sudden and extraordinary violence stunned the city, prompted a response from vacationing President Obama and escalated weeks of simmering ill will between police and their critics following grand jury decisions not to indict officers in the deaths of Eric Garner in New York and Michael Brown in Missouri. Garner and Brown were black; the officers who killed them are white.