A derailed train carrying a shipment of crude oil that exploded in Lac-Mégantic, Que. killing at least five people was destined for a Saint John, N.B. refinery.

Quebec Provincial Police confirmed Sunday afternoon that five people are dead in the small town east of Montreal, with another 40 or so people unaccounted for.

Irving Oil, the company that owns the Saint John refinery, issued a statement after confirming the shipment was bound for its facility.

"Our concern is for the tragic loss of life and the impact on the people of Lac-Mégantic," the statement read.

"The owners of the crude oil have confirmed to us that it was being transported by Montreal, Maine & Atlantic Railway (MMA) to be delivered to our refinery in Saint John. We immediately offered emergency response assistance to the authorities. Our thoughts and prayers are with all those who have been affected by this tragedy."

In recent years, much of the oil that comes from the western provinces and is processed at the Saint John refinery is delivered by train.

Since the company built a new rail terminal last year, the number of trains carrying oil into the city has more than doubled.

Train had no engineer

The president and CEO of Rail World Inc., the parent company of MMA, said the train pulling dozens of tankers filled with crude oil was parked uphill of Lac-Mégantic before the incident.

The engineer had finished his run and the company believes the brakes had been properly applied. The engineer left the train at 11:25 p.m. and went to a hotel for the night. The derailment happened less than two hours later.

It is still not clear what caused the train cars to roll downhill and leave the tracks. The company reports that the train was stopped 6.8 kilometres uphill from the town at 11:25 p.m. by the engineer. At some point before 1:15 a.m., the train moved downhill. Railway personnel pulled 13 cars intact from the rear of the train at the scene.

Witnesses reported hearing between five or six blasts as other tankers filled with oil burst.

The town, located about 250 kilometres east of Montreal, has a population of about 6,000. An estimated 2,000 people were evacuated following the explosion and subsequent fires.

Fire officials have said that at least 30 buildings have been destroyed in the centre of town where the train cars derailed, including the town’s library and archives. However, the full extent of the damage remains unknown. Police will not confirm the number of buildings damaged and say it is part of their investigation.

The Transportation Safety Board of Canada has dispatched investigators to the scene.

The fire has been contained, but has not been fully extinguished.