A gunman has shot dead two police officers sitting inside a patrol car in New York before killing himself, reports GHN based on BBC.
The head of the New York police said the men had been "targeted for their uniform". The gunman then ran into a subway station where he shot himself.
Earlier he had shot and injured his ex-girlfriend and had posted anti-police messages on social media.
President Barack Obama - who is on holiday in Hawaii - said he condemned the killings unconditionally.
"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," he said in a statement.
The mayor of New York, Bill de Blasio, said anyone who saw postings indicating a threat to the police should report them to the authorities. The "whole city was in mourning" after the shootings, he said.
The shootings come at a time when New York city police are facing intense scrutiny for their tactics, the BBC's Samira Hussein reports from New York.