SHERBROOKE, Quebec — Three men charged in a criminal negligence trial stemming from a 2013 derailment that killed 47 people in the Canadian province of Quebec have all been found not guilty.

The jury of eight men and four women reached the verdict Friday after nine days of deliberations.

A runaway train carrying crude oil from North Dakota derailed in Lac-Megantic, Quebec, and exploded on July 6, 2013, leveling much of the downtown.

Engineer Tom Harding and former colleagues Richard Labrie and Jean Demaitre each faced one count of criminal negligence causing the death of 47 people. They pleaded not guilty.

Labrie was the traffic controller and Demaitre was the manager of train operations.

The prosecution argued that Harding played a significant role in the accident because he didn’t apply a sufficient number of brakes or test them to ensure they worked properly after leaving the train for the night in nearby Nantes, Quebec.

That left the locomotive resting precariously on a slope 6 miles away from downtown Lac-Megantic.

The prosecution also blamed Labrie and Demaitre, arguing their responsibilities included taking the necessary steps to avoid injuries and loss of life the night before the derailment.

The prosecution claimed neither man checked with Harding to see how many handbrakes had been applied and whether tests had been conducted.

Tom Walsh, a lawyer for Harding, said his client was too emotional to speak but said he feels relieved.

“He always admitted his responsibility. His only claim was that the responsibility was not the equivalent of criminal negligence,” Walsh said.

“He’s very marked by this experience and he will always feel a tremendous moral responsibility and he will never be able to rid himself of that feeling.”

Walsh said a public inquiry would have been more appropriate so that all the circumstances of the tragedy could be determined.

Prosecutor Veronique Beauchamp said it is too early to say whether there will be an appeal.

“You’ll understand it is not necessarily the decision we were expecting, but we respect the verdicts that were handed down and, especially, the work the jurors put in,” Beauchamp said.

A tearful Labrie said he just wants to go back to being anonymous.

“I’m certainly very relieved,” he said.

One of Harding’s lawyers said the rail disaster was an accident resulting from a perfect storm of unforeseeable events.

“We can’t hold people criminally responsible for not being perfect,” lawyer Charles Shearson told the court during the trial. Shearson said Harding admitted to not conducting a proper brake test and failing to apply a sufficient number of handbrakes, which would have prevented the train from moving after its engine was shut off.

He suggested that evidence presented during the trial demonstrated that The Montreal, Maine & Atlantic Railway didn’t require its employees to perform brake tests perfectly in line with the federal regulations.