SPARTANBURG, S.C. (WSPA) — The suspect in an attack of an off-duty officer at a Walmart Spartanburg appeared for his bond hearing Friday afternoon.

Spartanburg Police Department officials said the suspect, James Ray Cunningham, was taken into custody at an area Walmart Thursday after he reportedly attacked an off-duty police officer inside the store.

James Ray Cunningham mugshot

According to a news release, 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.

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

Police said Spartanburg County E911 said that the officer was being attacked by a suspect in the store.

According to a release, the off-duty officer was working security for Walmart.

After the incident, the man reportedly left the scene running across Walmart’s parking lot.

Police said Cunningham, 22, then got into a black vehicle, registered to his mother, parked at the bottom of the parking lot.

He then tried to leave the scene, but crashed into the vehicle.

Cunningham then ran to the PetSmart parking lot, in a shopping center across the street from The Dorman Centre, where he was then arrested.

7th Circuit Solicitor Barry Barnette showed surveillance video of the attack inside the store during bond hearing.

The video showed Cunningham running and attacking the officer — identified by police as Eric Hansen — and then knocking him unconscious.

Cunningham then reportedly dragged Hansen, while trying to take the officer’s weapon from his holder.

Barnette said three or four, including an employee at the store, then came forward to help the officer.

“I’ve been in this business a long time,” Barnette said. “I’ve never seen an attack like this.”

Barnette then asked the judge to deny bond for Cunningham.

Cunningham was being held in the Spartanburg County Detention Center on charges of attempted murder, assault and battery, and possession of a weapon during a violent crime.

The judge said Cunningham’s attempted murder and possession of a weapon during a violent crime charges would be referred to Circuit Court regarding bond, but did issue a $1,000 surety bond on the assault and battery charge.

He was previously arrested in 2017 after Spartanburg County deputies said he reportedly stabbed his brother in the neck at a home on West Camelton Drive. The attempted murder charge was later dropped, according to court records.

In another case, Cunningham was charged with assault and battery after he reportedly punched his co-worker and slammed her to the floor at a McDonalds in Duncan. That case is still pending, according to court records.

A background check on Cunningham also showed that he was convicted Tuesday of assault and battery after an incident on July 1 in Horry County.