NEW YORK - New York reeled Sunday after the murder of two uniformed cops by a man whom investigators say told bystanders to "watch what I'm going to do" just before the killings.
Candles, flowers and an American flag were placed at a makeshift memorial at the scene of the shooting, which apparently was out of revenge for the recent killings of unarmed black men by police.
A somber mass was held at Saint Patrick's Cathedral in Manhattan and the New York Jets football team held a moment of silence.
After nightfall, supporters gathered for a candlelight vigil, singing and saying prayers.
The two officers - Wenjian Liu, 32, and Rafael Ramos, 40 - were shot in the head through the window of their patrol car in broad daylight Saturday in Brooklyn in an attack that shocked America's biggest city just days before Christmas.
Police named the shooter as Ismaaiyl Brinsley, 28. He fled to a nearby subway station after the attack, where he shot himself in the head on the platform.
Investigators said Brinsley had shot his ex-girlfriend, who survived, at her apartment outside Baltimore before heading for New York.
Just before the shooting, Brinsley spoke with bystanders, asking them about their gang affiliation, urging them to follow him on Instagram and to "watch what I'm going to do," the New York Police Department's chief of detectives Robert Boyce said.
"They Take 1 of Ours...Let's Take 2 of Theirs," read a comment seemingly written by Brinsley on Instagram just hours before the assault, next to a photo of a silver handgun.
Brinsley had been arrested at least 19 times, Boyce said, mostly while living in Georgia, on charges ranging from disorderly conduct to terror threats.
Boyce said Brinsley's mother was afraid of her son, who had a "very troubled" childhood, was often violent and had tried to commit suicide.
'Blood on your hands'
The double killing, in a city where murders are at their lowest rates in 20 years, further strained the already fraught relations between Mayor Bill de Blasio and police.
A number of officers, in apparent homage to their slain colleagues, turned their backs to the mayor at the hospital where the two cops were pronounced dead.
Police officers accuse de Blasio of failing to support them and of being too sympathetic to demonstrators who, in recent weeks, have been protesting police violence against African Americans.
"Mayor de Blasio...the blood of these two officers is clearly on your hands," said Edward Mullins, president of the Sergeants Benevolent Association of some 11,000 active or retired New York police officers.
De Blasio responded to criticism - including from former state governor George Pataki - by calling for an end to "irresponsible, overheated rhetoric that angers and divides people."
At a news conference outside Ramos's childhood home, 75th Precinct Community Council president Juan Rodriguez called for reform.
"Mr Mayor, you need to have a sit down and you need to get everything corrected from the mayor's office down. This is wrong," he said.
'Worst day of my life'
In a Facebook posting, Ramos's 13-year-old son Jaden wrote that he was mourning the death of the "best father."
"Today is the worst day of my life," he wrote.
A foundation set up by the late owner of the Yankees baseball team said it would pay for the education of Ramos's children, according to the New York Daily News.
Many in the African American community have been angered by recent killings of unarmed black men by police, which have sparked nationwide protests.
In July, Eric Garner, an unarmed father of six, died in New York after police held him in a chokehold while he was being arrested for illegally selling cigarettes.
Michael Brown, an 18-year-old in Ferguson, a suburb of St Louis, Missouri, was shot dead by a police officer in Aug.
Grand jury decisions not to indict the white officers responsible triggered mass protests in New York and other US cities.
Boyce said Brinsley had specifically mentioned Brown and Garner on Instagram and had made other postings of "self-despair or anger" at the state of his life.
Amid a chorus of calls for calm and unity, President Barack Obama "unconditionally" condemned the killings, and urged Americans "to reject violence and words that harm, and turn to words that heal."
The families of Garner and Brown also urged the public not to commit "any kind of violence directed toward members of law enforcement. It cannot be tolerated. We must work together to bring peace to our communities."