A prosecutor in Minnesota on Wednesday said he had brought second-degree manslaughter charges against a police officer involved in the July shooting death of a black motorist that sparked outrage after it was broadcast on social media.

Ramsey County Attorney John Choi said St. Anthony police officer Jeronimo Yanez broke the law when he shot and killed Philando Castile, 32, in Falcon Heights, a St. Paul suburb, during a traffic stop.

Castile’s girlfriend, Diamond Reynolds, live-streamed images of him after he was shot, and some went viral on social media.