(In paragraph 29, corrects to say it would be deadliest accident in Canada since 1998 crash, not 1956)
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 exploded and destroyed the center of a small Canadian town in a disaster that raises fresh questions about shipping oil by rail.
The train had been hauling crude from North Dakota to eastern Canada, and was parked, without a driver, outside town when it began rolling downhill, gathering speed and derailing on a curve at 1 a.m. (0500 GMT) on Saturday.
Each tanker carried 30,000 gallons (113,000 liters) of crude oil. Four cars caught fire and exploded in a huge orange and black fireball that mushroomed hundreds of feet into the air and flattened dozens of buildings, including a popular bar.
Police said were investigating the disaster, and would talk to everyone involved.
Graphic showing location of disaster
Concern rises about crude by rail..........
"Every time the Surete (Quebec police) needs to investigate, we need to rule out any foul play," 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."
Shipping oil on rail cars has skyrocketed in the past year as crude producers seek alternatives to pipelines that are already full to capacity. Previous accidents led to messy spills rather than life-threatening explosions.
Brunet said about 40 people were missing after the derailment early on Saturday. "There could be more, there could be less," he said.
Very few injured 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.
It is not clear why the train began rolling down toward the town, or why the crude oil, not normally considered highly explosive, blew up. The rail line is owned by Montreal, Maine & Atlantic, which said the engineer had secured the train for the night and left.
"That's the first thing I would think of: did someone release all the brakes?" asked Gary Landrio, a Warren, Pennsylvania, railroad consultant with 37 years of industry experience. "In my experience, a train doesn't just simply let itself go down the hill into a town. There's usually a cause behind it."
Genevieve Guilbault, spokeswoman for the coroner's office, said the dead were burned beyond recognition and that DNA and dental records would likely need to be used for identification.
"Given the size and intensity of the blast, you can imagine the condition of the bodies," she told reporters.
White vapor still rose on Sunday 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.
Yvon Rosa said he and a friend had just left the Musi-Cafe when they saw the train hurtling toward them. As the town center exploded, they ran to the lake, jumped in a boat and went out onto the water until morning.
"It was incredible. The smoke, the heat - fire everywhere. There were people running... It was like the apocalypse," he told Reuters.
About 2,000 of the town's inhabitants were evacuated after the blast, scores at them to a school transformed into a shelter.
Outside the building, Louise Boulet, 65, looked at a local newspaper that had published an aerial view of downtown. One of the flattened buildings was the house where her 63-year old sister, Marie-France Boulet, lived.
"She is dead for sure. If she were alive, her car would not still be there," Louise said, pointing to a burned-out vehicle in the photo.
Marie-France ran a women's clothing shop from the front of the building where she lived by herself.
"She was my best friend," Louise said as tears welled in her eyes. "She died with all of my secrets and I will guard all of hers."
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 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.
"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.
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.
If the death toll does hit 45, it would be Canada's deadliest accident since 229 people died in 1998 when a Swissair jet crashed into the sea off eastern Canada. (Writing by David Ljunggren in Ottawa; additional reporting by Scott Haggett in Calgary and Cazary Podkul in New York; Editing by Janet Guttsman and Bill Trott)