US president Barack Obama has offered full support and federal assistance to the New York Police Department after two of its officers were shot dead.
The White House said President Obama called New York City Police Commissioner Bill Bratton on Sunday from Hawaii, where the president is on holiday, and offered condolences.
White House spokesman Eric Schultz said Mr Obama also said Americans must reject violence and instead turn to prayer and sympathy for the victims’ relatives.
He said the administration will work with leaders across the country to echo that message.
Officers Rafael Ramos and Wenjian Liu were shot dead in Brooklyn.
The gunman, Ismaaiyl Brinsley, 28, had shot and wounded his former girlfriend in Baltimore earlier and made posts on her Instagram account.
Brinsley posted about shooting two “pigs” in retaliation for the police chokehold death of Eric Garner.
According to officials, Brinsley wrote on Instagram: “I’m putting wings on pigs today. They take 1 of ours, let’s take 2 of theirs.”
Authorities say Brinsley fatally shot himself after killing the officers.