DORCHESTER, N.B. -- The death of a man who was repeatedly pepper sprayed at a New Brunswick prison was preventable, Canada's correctional investigator has found in a damning review that concludes unnecessary force was used.

Matthew Ryan Hines, who was serving a five-year sentence at Dorchester Penitentiary for offences including robbery, died on May 26, 2015.

In a report released Tuesday, Ivan Zinger said the repeated use of pepper spray at very close range appears to have contributed to Hines's rapid onset of medical complications.

Zinger found correctional staff used unnecessary physical and chemical force, even as Hines was "clearly and fully" under control by the guards, and failed to properly respond to the ensuing medical emergency.

"In this case, everything that could go wrong in a use-of-force intervention went wrong," said Zinger.

He said those factors ultimately led to the 33-year-old's death by acute asphyxia due to pulmonary edema -- a condition caused by excess fluid in the lungs.

A statement from the Hines family said they were grateful for the thorough investigation. They said Hines struggled with mental illness since he was an adolescent, and they said it is important that Canadians "understand the truth of what happened to him."

"The commitment that (the correctional investigator's office) has shown in the investigation of Matthew's death has given us hope that no one else will suffer as Matthew did," the statement said.

The statement also noted that his family was initially told that he died of a seizure.

Zinger's report said Correctional Service Canada provided misleading and incomplete information to the public and the family about the circumstances surrounding Hines's death.

The report also raises questions about the adequacy of the service investigating and disciplining itself.

"Although the internal investigation identified 21 legal and policy violations in the staff response, subsequent staff disciplinary proceedings were inherently flawed and self-serving," said Zinger,

"Corrective measures taken after the fact failed to reflect the nature and gravity of staff errors and omissions that contributed to this tragic, and, by my estimation, avertable death."

Correctional Services Canada has said one person was fired and three others were disciplined.

Zinger's report makes 10 recommendations, all of which have been accepted by Correctional Service Canada.

Public Safety Minister Ralph Goodale said he supports the recommendations. He said the Hines family and the wider public deserved to know how and why he died.

"We can do more to prevent deaths in custody," Goodale said in a statement.

"Moving forward, I am confident that implementing the recommendations, along with the changes (Correctional Services Canada) has already undertaken, will mean greater accountability, transparency, and most importantly, safety for all Canadians."

The recommendations include several aimed at addressing systemic gaps in how Correctional Service Canada staff respond to medical emergencies.

It also directs the service to immediately develop a separate intervention plan for front-line staff in recognizing and responding to medical and mental-health emergencies.

Last September, the investigation into Hines's death was reopened by the RCMP.