(CNN) The Minnesota police officer who fatally shot Philando Castile during a traffic stop in July was charged Wednesday with second-degree manslaughter and two felony counts of dangerous discharge of a firearm, Ramsey County Attorney John Choi said.

St. Anthony police Officer Jeronimo Yanez will make his first court appearance Friday, Choi said.

"Based upon our thorough and exhaustive review of the facts of the case it is my conclusion that the use of deadly force ... was not justified," Choi said in announcing the charges.

On Thursday, Yanez completed a summons booking at the Ramsey County Sheriff's Office, according to Sergeant John Eastham of the Sheriff's Office Public Affairs.

"Summons booking is a non-custody booking," Eastham said. "You come in get photographed and fingerprinted and leave once the process is completed."

Officer Jeronimo Yanez

News of Castile's July 6 death spread like wildfire on social media when his fiancée, Diamond Reynolds, live-streamed the aftermath of the shooting on Facebook. Reynolds' 4-year-old daughter was also in the car when the shooting occurred.

The incident, along with the July 5 fatal police shooting of Alton Sterling in Baton Rouge, Louisiana, sparked protests nationwide and renewed the debate over the relationship between law enforcement and the communities they serve.

Castile, 32, told the officer he was legally carrying a gun and and paramedics found a loaded pistol in his shorts, but "the mere presence of a firearm alone cannot justify use of deadly force," Choi said.

"No reasonable officer knowing, seeing and hearing what Officer Yanez did at the time would have used deadly force under these circumstances," Choi said.

What the officer said

Yanez's side of the story is partly given in the criminal complaint posted on the Ramsey County Attorney's website. The officer was interviewed July 7 by investigators and gave an account of the shooting.

Yanez said Castile told him he had a gun at the same time he reached down between his right leg and the center console of the vehicle, the complaint said.

"And he put his hand around something," Yanez was quoted as saying. He said Castile's hand took a C-shape, "like putting my hand up to the butt of the gun."

Yanez said he then lost view of Castile's hand.

"I know he had an object and it was dark," he said. "And he was pulling it out with his right hand. And as he was pulling it out, a million things started going through my head. And I thought I was gonna die."

Yanez said he thought Castile had the gun in his right hand and he had "no option" but to shoot, the complaint said.

"I don't remember the first couple shots. I believe I remember the last two shots. And I believe one of the shots went into his left arm. ... I remember smelling the gun smoke and the bright flashes from the muzzle."

But Choi noted at the news conference that Yanez told other officers immediately after the shooting that he didn't know where Castile's gun was.

Reynolds, Castile's fiancée, was quoted on the video as saying Castile was reaching for his driver's license.

Dashcam video captured conversation

Choi said Yanez told a fellow officer he wanted to pull over Castile's vehicle that night because the occupants looked like suspects in a convenience store robbery that occurred July 2. Castile's vehicle also had a nonworking taillight, Yanez said, according to Choi.

Squad car video and audio recorded the conversation and showed Castile first handed Yanez his insurance card, according to Choi. Then Castile calmly said that he had a firearm and a permit to carry it, Choi said.

Yanez told him not to reach for the gun and Castile twice said he was not going to do that, Choi said.

"Then Officer Yanez screamed, 'Don't pull it out' and quickly pulled his own gun with his right hand," Choi said. He fired seven rounds "in rapid succession" into the vehicle, Choi said.

'I wasn't reaching for it'

Castile's dying words were, "I wasn't reaching for it," Choi said.

Reynolds started live-streaming onto Facebook about 40 seconds after the last shot.

The aftermath of the shooting was streamed onto Facebook Live by Castile's girlfriend.

Reynolds' video feed showed Castile slumping in the front seat with blood covering his shirt. Her video also recorded Yanez outside the car saying, "I told him not to reach for it. I told him to get his hand off it."

The other police officer, who was standing on the passenger side of the car, never pulled his weapon, Choi said.

"He [Castile] volunteered in good faith that he had a firearm, beyond what the law requires," Choi said. "He emphatically stated he was not pulling it out. He was restricted by his seat belt. He was accompanied by a woman and a young child."

Emergency medical personnel found a .40-caliber pistol in the right front pocket of Castile's shorts, Choi said. The gun was loaded but didn't have a round in the chamber, he said. Also found in Castile's clothing was his wallet, which contained his driver's license and a concealed carry permit, Choi said.

"We believe Philando Castile never tried to remove the gun from his right front pocket that was a foot deep," Choi said.

Maximum sentence

Why didn't the state attorney charge Yanez with murder?

Choi didn't explain that during his news conference. CNN legal analyst Paul Callan said on Headline News that it's possible Choi "must have thought the officer was negligent and careless, that he didn't intentionally kill. But with seven shots fired, it suggests that this maybe goes beyond carelessness."

It's also possible, Callan said, that the state attorney thought second-degree manslaughter was a charge with which he could win a conviction.

Yanez's attorney could not immediately be reached for comment Wednesday, but told CNN previously that the shooting had nothing to do with race and everything to do with a gun being present at the scene.

Choi said he did not plan to immediately release the squad car video and audio to the public.

An assistant US attorney has been cross-deputized and will help the county attorney's office prosecute the case, Choi said.

If convicted, Yanez could be sentenced to up to 10 years in prison and fined $20,000 on the second-degree manslaughter charge. He also faces up to five years in prison and a $10,000 fine on the other charges.

According to the Twin Cities Pioneer Press , Yanez was placed on administrative leave, briefly put back on desk duty with the police department, then put on administrative leave again.

'We want peace'

Castile's mother, Valerie Castile, said Wednesday that she's happy the officer is being prosecuted and hopes there's no community unrest.

"We want peace," she said. "We don't want any protests to get outrageous."

Family lawyer Glenda Hatchett said the case is historic because, as far as she can determine, this is the first time a Minnesota law enforcement officer has been charged in the fatal shooting of a citizen.

"We see this as a stake in the ground," she said. "We are intending for this case to send a loud message that things must change in this country."