ST. PAUL — A Minnesota police officer was criminally charged Wednesday in the fatal shooting of Philando Castile, Ramsey County Attorney John Choi said.

On Wednesday, Choi's office charged St. Anthony Police officer Jeronimo Yanez with second-degree manslaughter and multiple counts of dangerous discharge of a firearm. He said that under Minnesota law as written the deadly use of force is not justified.

"I have given Officer Yanez every benefit of the doubt on his use of deadly force, but I cannot allow the death of a motorist who was lawfully carrying a firearm under these facts and circumstances to go unaccounted for," said Choi. He said second-degree manslaughter, which involves "gross negligence and an element of recklessness," is the most appropriate charge in these circumstances.

Yanez will make his first court appearance Friday. The county attorney said the officer is expected to turn himself in to authorities before then.

Choi said that after much deliberation it became clear to him that he must make the charging decision, and not refer the case to a grand jury.

"My conscience tells me it would be wrong to ask a grand jury to make this decision when I know in my heart what must be done," said Choi.

Prosecutors have been weighing potential charges against Yanez since receiving results of an in-depth investigation by the Minnesota Bureau of Criminal Apprehension on Sept. 28. Choi also enlisted the help of a special prosecutor, veteran civil rights attorney Don Lewis, to help forge a decision on potential charges and whether to bring the case to a grand jury.

Castile, 32, was fatally shot during a traffic stop the night of July 6 in Falcon Heights, Minn. His girlfriend Diamond Reynolds insists the officer shot Castile as he reached for an ID despite the fact Castile informed Yanez he had a gun and a permit to carry it. The officer's attorney has said the officer was simply reacting to seeing a gun.

Reynolds streamed the graphic aftermath of the shooting live on Facebook, which brought the incident into the national spotlight. The YouTube clip of the incident has been viewed millions of times. The shooting triggered a series of emotionally charged protests, including one that shut down Interstate 94 and injured a law enforcement officer. Protesters camped out for weeks in front of the mansion of Minn. Gov. Mark Dayton. They shut down Summit Avenue a number of times.

Choi's announcement comes a day after the one-year anniversary of another high-profile police killing in Minnesota. Jamar Clark was killed in Minneapolis on Nov. 15, 2015.

The deadly encounter with Clark, 24, followed a police call for a domestic assault at a birthday party where a man was interfering with medical personnel.

During a subsequent struggle with Clark, one of the officers told state investigators that Clark's hand reached his gun. The officer's partner reportedly warned Clark to release the weapon when Clark allegedly replied, "I'm ready to die.''

Hennepin County Attorney Mike Freeman decided no charges would be filed in that case, opting to make the decision himself instead of handing the case to a grand jury.

Castile was shot a day after a Baton Rouge police officer fatally shot Alton Sterling.

The July 5 shooting, recorded on two cellphones and shared on the Internet showed two white officers who pinned down Sterling. The police had responded to a convenience store after an anonymous caller indicated a man, later identified as Sterling, 37, was selling music CDs and wearing a red shirt threatened him with a gun, Cpl. L’Jean McKneely said.

Contributing: Kevin Johnson, USA TODAY; The (Lafayette, La.) Daily Advertiser; Step Solis, USA TODAY. Follow KARE-TV on Twitter: @kare11