OAKLAND (CBS SF) — Three men have been charged following the attempted murder of Ersie Joyner, a former Oakland Police captain who shot a fourth suspect dead during an armed robbery at a gas station last month, with the charges including murder for the suspect’s death.

The Alameda County District Attorney’s Office announced charges Tuesday, a day after Oakland police said the three suspects had been arrested. The suspects were identified as 20-year-old Kemandre King, 24-year-old Marlon King, and 28-year-old Joshua Hayles.

READ MORE: Steph Curry Closes In On 3-Pointers Record As Warriors Top Blazers

Kemandre King and Marlon King were arrested last week in Elk Grove, while Hayles was arrested in Houston, Texas on Nov. 19 and was being extradited back to California. Both Kemandre King and Marlon King were arraigned Tuesday morning at the East County Hall of Justice in Dublin.

(L-R) Kemandre King, Marlon King (Alameda County Sheriff’s Office)

On October 21, Joyner was pumping gas at a Chevron station at 17th and Castro St. in Oakland when three suspects confronted him at gunpoint and proceeded to rob him. Joyner pulled out a handgun and fired, hitting the fourth suspect, identified as 20-year-old Desoni Gardner. One of the suspects fired back at Joyner, hitting him multiple times.

Gardner died at the scene while the two others fled in a Nissan sedan driven by Hayles, the DA’s office said. The vehicle was located Oct. 25 abandoned in Berkeley.

Shootout at Oakland Gas Station

Ersie Joyner was wounded during a shootout at an Oakland gas station

READ MORE: Berkeley Police Arrest Convicted Sex Offender For Allegedly Accosting Teens, Claiming To Be Police Officer

“Ersie Joyner was senselessly attacked and shot while being robbed,” said District Attorney Nancy O’Malley in a prepared statement. “We continue to pray for his full recovery. Our thoughts are with him and his family.”

All three defendants were charged with the murder of Gardner and second-degree robbery of Joyner, the DA’s office said. Marlon King and Kemandre King were also charged with one count each of assault with a semiautomatic firearm; Marlon King was also charged with the attempted murder of Joyner.

The next court date is for Kemandre King and Marlon King is Dec. 17.

Former Oakland Police Captain Ersie Joyner (CBS)

Joyner is recovering after surgery last month. He was struck six times on his legs and torso.

Joyner grew up in poor East Oakland and rose through the ranks of the Oakland Police Department. He spent 28 years on the force before retiring in 2019. After his retirement, he became a part-owner of two cannabis companies.

MORE NEWS: 'This Is The Worst Time' – Half Moon Bay Merchants Blast PG&E Utility Work, Highway 92 Backups Before Holidays

Law enforcement sources told KPIX 5 it was unlikely the three suspects knew Joyner and OPD Chief LeRonne Armstrong said the motive appeared to be a random robbery.