Media playback is unsupported on your device Media caption How the Lac-Megantic train disaster unfolded

A Canadian jury has found three former rail workers not guilty of criminal negligence for their connection to the Lac-Megantic disaster five years ago.

On 6 July 2013, a runaway train filled with petroleum crude oil derailed in the small eastern Quebec town.

Forty-seven people were killed in the tragedy and much of Lac-Megantic's downtown core was destroyed.

The trial began on 2 October in a Quebec Superior Court in Sherbrooke, 100km (62 miles) west of Lac-Megantic.

Locomotive engineer Tom Harding, traffic controller Richard Labrie and manager of train operations Jean Demaitre were charged in 2014 with criminal negligence causing the death of 47 people.

Under Canada's criminal code, the charge carries a potential life sentence.

All three pleaded not guilty.

The twelve men and women on the jury began deliberating on 11 January.

On Tuesday, Quebec Superior Court Justice Gaetan Dumas sent them back into deliberations after they told him they were at an impasse.

Up in flames

The tragedy began when a fire broke out in the main locomotive after Mr Harding had parked the train in the village of Nantes and left for the night to sleep.

Firefighters extinguished the flames and turned off the engine, which cut the air brakes. An hour later, the train rolled into downtown Lac-Megantic and derailed, exploding in a huge blaze.

Mr Harding admitted that he only applied seven handbrakes and did not fully test them before leaving the train.

The prosecution argued more handbrakes would have stopped the train from moving.

After he learned of the explosion, Mr Harding helped emergency responders detach the remaining fuel cars from the train.

Long deliberations

When the verdict was finally read, CBC reported that the those in the courtroom let out a loud gasp.

The jurors listened to hours of technical testimony from train specialists, heard audio recordings from the incident and listened to former rail employees testify that the company had no budget for training and placed little importance on safety, according to CBC.

The jury deliberated for eight days, at one point asking the judge for clarification on the concept of "marked difference", which the behaviour of the accused would have to be noticeably different from a colleague in a similar circumstance.

Mr Harding and the other accused waived their right to mount a defence. Instead, their lawyers argued that the prosecutors' case did not meet the burden of proof.

Lawyers for the accused argued that many factors out of their control contributed to the disaster, including a culture at Montreal, Maine and Atlantic railway (MMA) of relaxed standards and insufficient training.

MMA also failed to heed a Transportation Safety Board's report that said the rail line running from Nantes to Lac-Megantic was the second steepest of any stretch of track in Canada.

The Canadian Transportation Agency suspended MMA's licence after the accident.