A St. Louis police officer was charged with manslaughter Friday for allegedly shooting a colleague as the two played Russian roulette, authorities said.

Officer Nathaniel Hendren, 29, shot Officer Katlyn Alix, 24, in his apartment in the city’s Carondelet neighborhood early Thursday in the presence of a third officer, police said.

Hendren was charged with involuntary manslaughter and armed criminal action, police said. If convicted, he faces up to 10 years in prison.

Alix was off duty at the time of the shooting, police said. Hendren and his partner were on duty. All three were in Hendren's apartment shortly before 1 a.m.

Hendren emptied the cylinder of the revolver and then put one cartridge back in, police said in a probable cause statement. He spun the cylinder, pointed it away and pulled the trigger, but the gun did not fire.

Alix then took the gun, pointed it at Hendren and pulled the trigger without it firing, police said.

Hendren’s partner told Hendren and Alix “that they shouldn’t be playing with guns and that they were police officers,” police said in the statement.

“He felt uncomfortable with them playing with guns and didn’t want to have any part of it and started to leave."

Hendren took the gun back and pulled the trigger.

“As (Hendren's partner) left the room but before leaving the apartment, he heard a shot," police said.

Alix was struck in the chest.

Hendren and his partner used police radio to report an officer in need of aid and rushed Alix to St. Louis University Hospital. She was pronounced dead soon after arriving at the hospital.

Police said Thursday that a preliminary investigation indicated that Hendren had “mishandled” the gun. Police Commissioner John W. Hayden Jr. called it an “accidental discharge of the weapon.”

Related:St. Louis police officer killed by colleague who 'mishandled' gun, authorities say

More:Charges: Cops said beating protesters would be 'a blast.' Then they hurt an undercover officer

The gun was recovered at the scene, police said. They have not said whether it was a service weapon, or why Hendren and his partner were at the apartment during their shift.

Alix entered the St. Louis Police Academy in June 2016 and was commissioned as a police officer two years ago. She was assigned as a patrol officer in South St. Louis. She is survived by her husband, mother, father and sister.

Hendren had been with the department for about a year, police said. His partner, also 29, has been with the St. Police Department for nearly two years.

“Today, as much as it saddens my staff and me to file these charges, Katlyn and her family deserve accountability and justice,” St. Louis Circuit Attorney Kimberly Gardner said.

Follow USA TODAY national correspondent Aamer Madhani on Twitter: @AamerISmad