NEW YORK (AP) — New York City's police commissioner says the gunman who ambushed and killed two officers had made online posts that were "very anti-police."

Commissioner Bill Bratton choked up at a news conference Saturday as he talked about the fatal shootings of Officers Rafael Ramos and Wenjian Liu in Brooklyn.

Bratton says gunman Ismaaiyl (IHSH'-mayl) Brinsley shot and wounded his former girlfriend in Baltimore earlier Saturday and made posts on her Instagram account.

Bratton didn't specify the contents of the posts, but two officials told The Associated Press that Brinsley posted about shooting two "pigs" in retaliation for the police chokehold death of Eric Garner. The officials spoke on condition of anonymity because they were not authorized to speak publicly.

Authorities say Brinsley fatally shot himself after killing the officers.

President Barack Obama says he unconditionally condemns the murder of two police officers shot in broad daylight on Saturday in New York. Obama says there's no justification for the slayings. He says police offers risk their own safety to serve and protect their communities and that they deserve the public's respect and gratitude.

New York City Police Commissioner Bill Bratton is calling it an assassination, while Attorney General Eric Holder calls it a senseless and "unspeakable act of barbarism."

Officials say Ismaaiyl Brinsley had vowed to kill two police officers in retaliation for the deaths of Eric Garner and Michael Brown at the hands of police. Police say Brinsley shot himself in the head after officers chased him down.

Brown's family of Michael Brown is also condemning the officers' killing. In a statement, the family says it rejects "any kind of violence directed toward members of law enforcement." It calls on citizens to "work together to bring peace to our communities" and offers prayers to the officers' families.

Copyright 2014 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.