A gunman ambushed and fatally shot two New York police officers on Saturday and then killed himself.
Ismaaiyl Brinsley, 28, has been named by police as the assailant.
Police Commissioner William Bratton identified the slain officers as Rafael Ramos, 40, and Wenjian Liu, 32.
The two officers were on duty sitting in their patrol car when they were attacked.
A post on social media site Instagram suggested it may have been a revenge attack related to a grand jury’s decision not to charge a white New York police officer over the July 2014 killing of Eric Garner, a 43-year-old black father of six.
That decision was announced nine days after a Missouri grand jury chose not to charge a white police officer for gunning down Michael Brown, an unarmed black teenager, in the Ferguson suburb of St. Louis.
The deaths of Garner and Brown sparked weeks of protests in Ferguson, New York and other cities.
Commissioner Bratton was asked whether there was a link between Brinsley and the protests, and said this was under investigation.
“There has been … a very strong anti-police, anti-criminal justice system, anti-societal set of initiatives under way and one of the unfortunate aspects sometimes is some people get caught up in these and go in directions they should not,” he said.
Bratton added police would investigate whether Brinsley had been part of protests in New York and in Atlanta, his last place of residence, over the Brown and Garner killings.
Bratton said there was no indication that the killings were linked to terrorism.
New York’s mayor Bill De Blasio said: “When a police officer is murdered, it tears at the foundation of our society. It is an attack on all of us. It is an attack on everything we hold dear. We depend on our police to protect us against forces of criminality and evil.”
New York police have come under intense pressure in recent weeks after mourners held a funeral for Akai Gurley, a black man killed by a white police officer in New York’s Brooklyn suburb.
The shooting of the father of a two-year old girl is another fatal police encounter fuelling outrage over what protesters say is a pattern of excessive force by authorities against black people.