A former rookie San Francisco police officer has been charged with manslaughter for fatally shooting a man through the window of a police car in 2017, District Attorney Chesa Boudin announced Monday.

Christopher Samayoa was days out of the Police Academy when he shot 42-year-old Keita O’Neil in the head during a police pursuit near the Alice Griffith housing projects on Dec. 1, 2017.

Samayoa was charged Monday with voluntary manslaughter, involuntary manslaughter, assault by an executive officer, assault with a semi-automatic firearm and negligent discharge of a firearm.At a press conference outside the Hall of Justice announcing the charging decision, Boudin said Samayoa made a “terrible, tragic and unlawful decision to pull and shoot his gun.”

Samayoa shot O’Neil while riding in the passenger seat of a patrol car with his field training officer. Police were chasing O’Neil as he drove a stolen California Lottery van that was carjacked earlier that day, the San Francisco Examiner reports.

Samayoa fired a single round through the window of his door when O’Neil pulled over, exited the van and ran past the patrol car. O’Neil was struck in the head and killed.

Police Chief Bill Scott fired Samayoa after the shooting.