Train operator says the locomotive may have been shut down after it had been parked for the night, releasing air brakes

More bodies were recovered on Sunday in the devastated Canadian town of Lac-Mégantic, raising the death toll to five after a runaway train derailed, leading to a series of explosions. With dozens of people reported missing, authorities expected to find more bodies once they reached the hardest-hit area.

Quebec provincial police Lt Michel Brunet said on Sunday at least 40 people were reported missing, but cautioned that the number could fluctuate up or down. Brunet confirmed two more deaths on Sunday afternoon and said two people were found dead overnight. One death was confirmed on Saturday.

Montreal, Maine & Atlantic, which owns the line, said it was investigating the cause of the accident, but the release of the train's brakes might be linked to how the locomotive was shut down on Friday night in the nearby town of Nantes.

"Every time the Surete [Quebec police] needs to investigate, we need to rule out any foul play," police spokesman Benoit Richard told reporters. "Right now, we cannot say it is a criminal act. We can only say we are looking at it as if it was."

Nantes mayor Sylvain Gilbert told local radio that town firefighters had dealt with a fire on the train when it was parked in the town on Friday night. It was not clear if that fire was connected in any way to the derailment, or why the train became unsecured in Nantes.

Montreal Maine & Atlantic said the engineer had secured the train in Nantes and left. It said the locomotive was subsequently shut down, "which may have resulted in the release of air brakes on the locomotive that was holding the train in place".

The company's statement did not mention a fire or explain when the train was shut down and company officials could not be reached to comment further.

Canada's Transportation Safety Board said the brakes would be a focus of its investigation.

"Certainly, the manner in which the train was secured, both hand brakes and air brakes – we'll be looking very strongly at that," chief investigator Donald Ross told reporters. He declined to comment on Montreal Maine & Atlantic's statement.

On Sunday, white vapour still rose from the town centre, which police had cordoned off. Photos showed shattered buildings, burning piles of rubble and stumps of burned trees.

"It looks like a war zone here," said Canada's prime minister, Stephen Harper, who visited the town on Sunday. "This is an unbelievable disaster. ... There isn't a family in this area that is not touched by this, that is not affected by this."

Very few people were treated in hospitals, indicating that those caught in the blast had either escaped or died. "It is a black-and-white situation," Quebec health minister Rejean Hebert told reporters.

Fires were still preventing rescuers reaching part of the 73-car train on Sunday, and billowing black smoke could still be seen long after the derailment.

The eruptions early on Saturday morning sent residents of Lac-Mégantic scrambling through the streets under the intense heat of towering fireballs and a red glow that illuminated the night sky.

The multiple blasts came over a span of several hours in the town of 6,000, which is about 155 miles (255km) east of Montreal and about 10 miles west of the Maine border. About 30 buildings were destroyed after tanker cars laden with oil caught fire in the picturesque lakeside town.

The cars exploded in the downtown district, a popular area packed with bars that are often crowded on summer weekend nights. Brunet said he could not say where the bodies were found exactly because the families had not been notified

Bernard Theberge, who was on the patio of the popular Musi-Cafe at the time of the crash, feared for the safety of those inside when the first explosion went off.

"People started running and the fire ignited almost instantaneously," he said.

"It was like a movie,

"There were people inside. I thought for maybe two seconds that I should go in, but the heat was too strong to get to the door. It's hard, it's huge. Imagine half the town on fire."

Rene Bolduc, who lives a few hundred metres from the site of the accident, said: "I was sleeping when it happened. There was a boom and the inside of my house turned red with the colour of the flames. I left with nothing but the shirt on my back."

He said he saw people running as flames towered overhead. "It felt like the hairs on my arms and face were burning off."

Louise Boulet, 65, looked at a local newspaper that had published an aerial view of the explosion scene.

"That is where my sister lived," she said pointing to an image of a flattened building. "She is dead for sure. If she were alive, her car would not still be there," she said, pointing to a burnt vehicle next to the building.

Myrian Marotte, a spokeswoman for the Canadian Red Cross in Lac-Mégantic, said about 2,000 people had been evacuated from their homes.

"There are those are still looking for loved ones," Marotte said.

Marotte said many of the evacuees were staying with family and friends. "Some people have lost everything," she said.

Edward Burkhardt, the president and chief executive of Rail World, the parent company of Montreal, Maine and Atlantic Railway, said the decade-old railroad had had a very good safety record. "Well, I think we've blown it here."

Because of limited pipeline capacity in North Dakota's Bakken region and in Canada, oil producers are using rail to transport much of the oil to refineries on the east, Gulf and west coasts, as well as inland. Canada's prime minister, Stephen Harper, has called rail transit "far more environmentally challenging" while trying to persuade the Obama administration to approve the controversial Keystone XL pipeline from Canada to the Gulf coast.

The Quebec accident was likely to have an impact across the border in the US. In Maine, environmentalists and state officials had previously raised concerns about the threat of an accident and a spill from railroad tank cars carrying crude oil across the state.

The Montreal, Maine and Atlantic Railway carried nearly 3m barrels of oil across Maine last year. Each tank car holds some 30,000 gallons (113,600 litres) of oil.