NEW YORK (Reuters) - A gunman shot dead two New York City police officers in what officials called an "assassination", hours after warning on social media that he planned an attack in retribution for recent U.S. police killings of unarmed black men.
Mayor Bill de Blasio on Sunday ordered flags flown at half staff around the city. New York City's main police union harshly criticized the city's first Democratic mayor in two decades for being insufficiently supportive of the department during recent waves of anti-police violence.
The gunman, 28-year-old Ismaaiyl Abdula Brinsley, traveled from Baltimore, where police said he had shot and wounded his girlfriend, to New York and during the day posted on the social media service Instagram that he would be "putting wings on pigs today," using an anti-police slur.
The two New York City Police Department officers, Rafael Ramos, 40, and Wenjian Liu, 32, had no time to react when Brinsley appeared next to their vehicle, and shot both officers with a silver semi-automatic handgun, said NYPD Police Commissioner William Bratton.
Baltimore police said they learned of the suspect's posts on Saturday afternoon and called NYPD officials to alert them that digital data showed he had traveled to the city's borough of Brooklyn. But the call came in less than an hour before officials said Brinsley, who was black, shot and killed two officers as they sat in their patrol car near a major housing project.
The officers he killed were Hispanic and Asian-American.
Brinsley fled to a nearby subway station where he shot himself in the head and died, Bratton added.
The attack, the first fatal shooting of an NYPD officer since 2011, follows weeks of sometimes violent protests around the United States over a pair of incidents in which white police officers shot and killed unarmed black men. In July, a police officer in New York's Staten Island borough killed Eric Garner, a father of six, while trying to arrest him for illegally selling cigarettes.
In each case, grand juries that reviewed the deaths concluded that the police officers involved had broken no laws. The decisions not to charge the officers added to protesters' anger.
De Blasio, who called the attack an "assassination," and Bratton attended a Sunday morning service at St. Patrick's Cathedral, where Cardinal Timothy Dolan addressed the shooting.
"We mourn the brutal and irrational execution of two young, promising, devoted police officers," Dolan said. "We worry about a city tempted to tension and division."
In August, a police officer in the St. Louis suburb of Ferguson, Missouri, shot and killed a 18-year-old Michael Brown after an argument that began while Brown was walking in the middle of the street on a residential block after allegedly stealing a box of cigarillos from a convenience store.
Brinsley cited both cases in the Instagram post in which he threatened police, saying "they take 1 of ours ... let's take 2 of theirs."
Meanwhile, 30 miles northwest of Tampa, Florida, a police officer was shot and killed early Sunday, local authorities reported. They had not yet released a motive for the attack.
Leaders of recent anti-police protests, including longtime New York civil rights activist Reverend Al Sharpton, also condemned the attack.
Bratton said investigators were checking whether Brinsley had attended any of the recent protests.
One of the longest-standing U.S. civil rights groups, the NAACP, on Sunday joined in condemning the attack but warned against tying it directly to the recent anti-police demonstrations.
"There is no connection between the peaceful protest of thousands of people of all races all over the country and, indeed, around the world, and this hideous act of violence," the group's legal defense fund said in a statement.
The killings also revealed bitter anger among some police toward New York City Mayor Bill de Blasio, who they see as not being supportive in the face of public anger.
Several officers turned their backs on de Blasio when he arrived at the Brooklyn hospital where the two officers were taken after they were shot, video showed.
Patrick Lynch, head of the Patrolmen's Benevolent Association, the country's largest municipal police union, said, "There's blood on many hands tonight ... That blood on the hands starts on the steps of City Hall in the office of the mayor."
The PBA had previously started a campaign in which officers could fill out a form asking de Blasio and other officials not to attend their funerals if they were to die in the line of duty.
It was not clear on Sunday how many officers had filled out the forms and information on the two slain officers' funerals was not yet available.
Writing by Scott Malone, editing by David Evans and Diane Craft