By Richard Valdmanis and Julie Gordon
LAC-MEGANTIC, Quebec, July 7 (Reuters) - At least five people died and 40 were missing on Sunday after a runaway train carrying crude oil derailed and exploded in the center of a small Canadian town in a disaster that raised fresh questions about shipping oil by rail.
The train was hauling crude in 72 tanker cars from North Dakota to eastern Canada. It was parked, without a driver, but then it rolled downhill, gathered speed and derailed on a curve in the small town of Lac-Megantic at 1 a.m. (0500 GMT) on Saturday.
Montreal, Maine & Atlantic, which owns the line, said it was still investigating the cause of the accident, but offered one possible explanation of how the air brakes on the locomotive holding the train in position could have been released.
The firm said the release might be linked to how the locomotive was shut down when the train was parked at Nantes Station, about 12 km (8 miles) west of Lac-Megantic, on Friday night.
It said the locomotive was shut down after the departure of the engineer who had handled the train from Farnham, near Montreal, but did not elaborate.
Each tanker carried 30,000 gallons (113,000 liters) of crude oil. Four cars caught fire and exploded in a orange and black fireball that mushroomed hundreds of feet into the air and flattened dozens of buildings, including a popular bar.
Police spokesman Michel Brunet said about 40 people were missing after the derailment. "There could be more, there could be less," he said. Few residents expected any of the missing to be found, given the devastation.
In the past year, crude producers began shipping much more oil on rail cars instead of pipelines, which are at capacity. Previous accidents led to messy spills rather than life-threatening explosions.
Montreal Maine & Atlantic said the engineer had secured the train on Friday night at the nearby town of Nantes and left.
A company statement on Sunday said "the locomotive of the oil train parked at Nantes station was shut down subsequent to the departure of the engineer ... which may have resulted in the release of air brakes on the locomotive that was holding the train in place." It did not give a more detailed explanation.
Nantes Mayor Sylvain Gilbert told local radio that town firefighters had dealt with a fire on the train on Friday night, but gave no further details. It was not clear whether the fire was connected to the derailment.
Police said they were investigating the disaster, and would talk to everyone involved.
"Every time the Surete (Quebec police) needs to investigate, we need to rule out any foul play," Quebec 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."
Prime Minister Stephen Harper toured the area and compared it to a war zone.
Very few people were treated in hospitals, indicating those caught in the blast had either escaped or died. "It is a black-and-white situation," Quebec Health Minister Rejean Hebert told reporters.
On Sunday, white vapor rose from the town center, which police have cordoned off. Photos showed shattered buildings, burning piles of rubble and stumps of burned trees.
Residents said they were particularly concerned about people who had been inside the Musi-Cafe bar, which was right next to the center of the blast.
About 2,000 of the town's inhabitants were evacuated.
Lac-Megantic, a town of 6,000 on the edge of a deep blue lake and ringed by forests of pine and birch, is in the predominantly French-speaking province of Quebec, about 160 miles (255 km) east of Montreal and close to the border with Maine and Vermont.
About a kilometer away from the train's wreckage, water along the lake's edge had a sheen and the rocks appeared oily. Emergency crews had placed booms in the water near the explosion site to prevent oil from drifting.
About 150 firefighters, some from the United States, spent most of Saturday spraying cold water from the lake on five tanker cars they said still posed a serious risk of exploding.
Fire officials said on Sunday they had contained the risk somewhat, and only two tankers were still considered at risk of blowing up.
The disaster will focus attention on the merits of TransCanada Corp's proposed Keystone XL pipeline from the oil sands of Alberta to the Texas coast, a project U.S. President Barack Obama is considering whether to approve.
Proponents of Keystone XL, which environmentalists strongly oppose on the grounds that extracting crude from the tar sands generates more greenhouse gas emissions than regular drilling, say shipping oil by pipeline is safer than using rail cars.
The Montreal, Maine & Atlantic line carried an average of about 16,500 barrels per day of crude in the first four months of this year, 10 times more than a year before, according to data from the Maine Department of Environmental Protection.
"On the face of it, this should be a boost for pipeline solutions, especially given the improvements in pipeline technology over the past five decades," said Ed Morse, managing director of commodity research at Citi Group. But he said it was too early to draw conclusions.
Montreal, Maine & Atlantic owns some 510 miles (820 km) of track in Maine and Vermont in the United States and in Quebec and New Brunswick in Canada.