BAKERSFIELD, Calif. (KGET) — One of two men charged in connection with a shooting death authorities say resulted from a drug deal gone wrong has accepted a plea deal.

Ameion Oliver, 20, pleaded no contest Friday to second-degree robbery for a five-year prison term. Judge Michael G. Bush dismissed a first-degree murder charge and scheduled sentencing July 20.

Darius Poole listens as he’s arraigned on murder and robbery charges in this file image.

Co-defendant Darius Poole, 21, remains charged with murder and robbery and is scheduled for an estimated 10-day trial next month.

The two have been in custody since the March 12, 2020, death of Los Angeles resident Joshua Rocha, 21.

Police say in court filings Oliver and Poole got in the back seat of a car occupied by two other men in Stonecreek Park to buy codeine cough syrup. They soon argued, the reports say, and Oliver tried to take a backpack from Rocha.

As they struggled, Poole shot Rocha, the filings say. Rocha was taken to a hospital, where he was pronounced dead.

The suspects ran through a neighborhood on Whitegate Avenue, police said. As they fled, Poole fell into a backyard pool.

His wallet was later found there, the filings say, leading police to identify him as a suspect.

When questioned, Poole told police he was never threatened or attacked by Rocha or the other person.

Oliver corroborated Poole’s statement, the filings say. He told police shoes with distinctive graffiti on them found near the crime scene were his.

The gun used in the killing was found by a 10-year-old boy who accidentally fired a round, police said. No one was injured.