BREVARD COUNTY, Fla. – Corrections officers who restrained, pepper-sprayed and shocked an inmate they said resisted them have been cleared of wrongdoing in connection with the man's death.

Officials from the state attorney's Office announced Monday that a use-of-force investigation into the incident involving inmate Gregory Edwards had concluded.

State Attorney Phil Archer wrote in a letter to the Brevard County Sheriff's Office that Edwards was behaving erratically.

"His unlawful and violent resistance to the efforts of the deputies to maintain control over him which resulted in a serious injury to a deputy, completely justified the escalation of use of force techniques to gain control," Archer wrote.

Edwards' death was ruled accidental as a result of excited delirium.

Edwards was arrested Dec. 9 after he was accused of battering a worker who was placing toys in a truck for a children’s charity.

Deputies said he was violent during the booking process.

A medical examiner wrote in an autopsy report that Edwards was pepper-sprayed, shocked with a stun gun and handcuffed, then put in a restraint chair and a spit hood. He was later found unresponsive in a holding cell and died at a local hospital the next day, records show.

He did not have any drugs or alcohol in his system at the time of his death, according to the medical examiner's report.