Police deaths: Obama offers support
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 Mr 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.
Just minutes before a wanted poster for Brinsley arrived in the NYPD's Real Time Crime Centre, he ambushed the two officers in their patrol car in broad daylight, fatally shooting them before killing himself inside a subway station.
In his Instagram posts, Brinsley used the hashtags Shootthepolice RIPErivGardner (sic) RIPMikeBrown - references to the two police-involved deaths that have sparked major protests around the U.S.
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 a Brooklyn neighborhood.
"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 killings stunned the city, escalating weeks of simmering ill-will between police and their critics following grand jury decisions not to indict officers in the deaths of Mr Garner in New York and Michael Brown in Missouri.
The New York police union head declared there's "blood on the hands" of protesters and the city's mayor.
Brinsley took off running after the shooting. Officers chased him down to a nearby subway station, where he shot himself in the head as a subway train door full of people closed. A silver handgun was recovered at the scene, Mr Bratton said.
"This may be my final post," Brinsley wrote in the online post that included an image of a silver handgun. The post had more than 200 likes, but also had many others admonishing his statements.
The Rev Al Sharpton, a prominent civil rights activist, said Mr Garner's family has no connection to the suspect and denounced the violence.
"We have stressed at every rally and march that anyone engaged in any violence is an enemy to the pursuit of justice for Eric Garner and Michael Brown," he said.
Mr Brown's family condemned the shooting in a statement posted online by their attorney.
"We reject any kind of violence directed toward members of law enforcement. It cannot be tolerated. We must work together to bring peace to our communities," the family said.
Mr Garner, who was black, died after he was taken down by a white officer during an arrest on suspicion of selling loose cigarettes.
The 18-year-old Brown, who was black, was fatally shot by a white officer. Both Garner and Brown were unarmed.
Most of the protests have been peaceful, particularly in New York. Mr Bratton said police were investigating whether Brinsley had attended any rallies or demonstrations and why he had chosen to kill the officers.
Brinsley was black; the officers were Asian and Hispanic, police said.
Mayor Bill de Blasio said the killings of Mr Ramos and Mr Liu struck at the heart of the city.
"Our city is in mourning. Our hearts are heavy," said an emotional Mr de Blasio. "It is an attack on all of us."
Scores of officers in uniform lined up at the hospital driveway. Officers raised their hands in a silent salute as two ambulances bore away the slain officers' bodies. The mayor ordered flags to fly at half-staff.
Mr Obama, vacationing in Hawaii, issued a statement saying he unconditionally condemns the slayings.
"The officers who serve and protect our communities risk their own safety for ours every single day - and they deserve our respect and gratitude every single day," the president said.
" Tonight, I ask people to reject violence and words that harm, and turn to words that heal - prayer, patient dialogue, and sympathy for the friends and family of the fallen."
The tragedy ended a bizarre route for Brinsley that began in Maryland early on Saturday. He went to the home of a former girlfriend in a Baltimore suburb and shot and wounded her.
Police there said they noticed Brinsley posting from the woman's Instagram account threats to kill New York police officers.
Baltimore-area officials sent a warning to New York City police, who received it moments too late, Mr Bratton said.
However, t he posts were apparently online for hours, though it is not clear if anyone reported them.
Mr Bratton called on New Yorkers to alert authorities of any threats to police they see - even if they do not seem real. "That information must get into the hands of the police officers," he said.
Brinsley had a history of arrests in Georgia for robbery, disorderly conduct and carrying a concealed weapon. Bratton said his last-known address was in Georgia, but he had some ties to Brooklyn.
Meanwhile, the department grieved the sudden and violent loss of the officers.
"Both officers paid the ultimate sacrifice today while protecting the communities they serve," Mr Bratton said on Saturday night.
Mr Ramos was married with a 13-year-old son and had another in college, friends said. He had been on the job since 2012 and was a school safety officer. Mr Liu had been on the job for seven years and got married two months ago.
Mr de Blasio and the president of the Patrolmen's Benevolent Association, Patrick Lynch, have been locked in a public battle over treatment of officers following the grand jury's decision in the Garner case.
Just days ago, Lynch suggested police officers sign a petition that demanded the mayor not attend their funerals should they die on the job. On Saturday, some officers turned their backs on Mr de Blasio as he walked into the hospital.
"That blood on the hands starts at the steps of City Hall, in the office of the mayor," Mr Lynch said. "After the funerals, those responsible will be called on the carpet and held accountable."
The New York Police Department said the gunman had told two passers-by to "watch what I'm going to do".
Chief of Detectives Robert Boyce said Brinsley talked to people on the street just moments before the shooting and told them to follow him on the social media site Instagram.
Mr Boyce said Brinsley had a criminal history with at least 19 arrests and his family told police he tried to hang himself last year.
Boyce said Brinsley had ranted online about police and government and expressed despair about his own life.