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.