SPARTANBURG COUNTY, S.C. (WSPA) – A Woodruff man received a 24-year prison sentence for attempting to kill an off-duty police officer working extra duty at Walmart in August 2020.

James Ray Cunningham, 23, pleaded guilty Monday to attempted murder, possession of a weapon during the commission of a violent crime, third-degree assault and battery and hit and run for the Aug. 20, 2020 attack.

Officers were called to Walmart, located at 141 Dorman Centre Drive, located within the The Dorman Centre shopping center, at around 1:30 p.m. on a call about a disturbance and a fight.

Watch surveillance video of the attack in the video player above.

While officers were responding to the scene, the call was upgraded to an officer down call.

According to the Spartanburg County Solicitor’s Office, Cunningham assaulted the uniformed city police officer without provocation as the officer stood near the self-checkout line.

Cunningham carried a knife when he first initiated the attack. The knife fell to the ground and Cunningham used his fist to beat the officer unconscious.

Cunningham then attempted to pull the officer’s weapon from his belt, the solicitor’s office said. Cunningham pulled the gun with enough force to lift the unconscious officer off the ground.

Several bystanders who witnessed the attack pulled Cunningham off the unconscious officer. The bystanders stopped the attack while others in the store called 911. Cunningham punched a customer several times before fleeing the store.

Cunningham attempted to flee the parking lot in a Chevrolet Cavalier but wrecked the car in the bottom of the parking lot, the solicitor’s office said. Cunningham ran to the Pet Smart parking lot on East Blackstock Road where he was arrested while trying to hide in bushes.

After his arrest, Cunningham admitted to arming himself with the knife in an attempt to kill the officer. He told investigators he planned to kill the officer, others around him and himself when he reached for the officer’s gun.

The injured officer was treated at Spartanburg Regional Medical Center.

While in the courtroom, Cunningham also pleaded guilty to first-degree assault and battery and second-degree assault and battery in unrelated cases.

Watch Cunningham’s bond hearing below:

According to the solicitor’s office, Cunningham assaulted a coworker at the McDonald’s on Highway 290 on January 10, 2018, causing serious injuries to the victim. He also assaulted a fellow inmate at the Spartanburg County Detention Center on April 26, 2021. The victim in the detention center assault sustained injuries to his head and face. 

Along with the 24-year sentence, the judge served a consecutive 3-year sentence on the second-degree assault and battery conviction that was suspended to time served plus 5 years of probation.