The death toll from a devastating train derailment in Lac-Megantic, Que., rose to five on Sunday and officials say there are about 40 people who remain unaccounted for – a number that police warn could go up or down.

Quebec Provincial Police Lt. Michel Brunet said about 40 people in the community of 6,000 are considered missing, a day after the train carrying crude oil derailed in the small Quebec town, setting off a series of explosions.

Brunet said 40 was an estimate at this point, but he warned that the death toll may rise as the investigation continues.

The victims have not been identified, and Brunet would not say where they were found, citing the ongoing police investigation.

Genevieve Guilbault,from the Quebec coroner’s office, said the recovered bodies had suffered burns, making it difficult to identify them.

Fire chief Paul Lauzon said fire crews worked overnight to cool five tankers to make sure they did not explode. He said as of Sunday morning, two of the 73 tankers involved in the derailment remained a concern.

The blasts destroyed around 30 buildings and sent large fireballs and mushroom clouds rippling into the sky.

Witnesses reported hearing multiple explosions and seeing flames shoot up as high as 300 feet. Amateur photos and videos from the scene showed enormous flames and clouds of smoke emanating from the region.

Lauzon said a number of historic buildings and community landmarks had been destroyed.

“It’s a great mess,” he said.

Transportation Safety Board officials told reporters that they had recovered the locomotive’s black box, which will be sent to a lab in Ottawa for examination.

Crews continued to work Sunday evening to extinguish “hot spots” while teams searched for victims in a small area that is not currently restricted by firefighters.

Harper visits scene of disaster

Prime Minister Stephen Harper toured the community-- located around 250 kilometres east of Montreal -- Sunday afternoon.

Speaking with reporters afterward, Harper called the site an “unbelievable disaster.”

“There isn’t a family in this area that is not touched by this,” he said.

“A large part of the downtown has been destroyed. It is really just terrible.”

Harper said while he is “very concerned” with the information he has received about the derailment so far, he said government is waiting for all the information and will act on recommendations put forth following a Transportation Safety Board investigation.

Harper extended the thoughts and prayers of Canadians to the people of Lac-Megantic as they cope with the loss of life and start rebuilding.

“The solidarity of everybody is quite strong but I know there’s going to be waves of emotion over the next few weeks as the extent of this … becomes increasingly obvious.”

Search for the missing continues

Police urged residents who are still missing family members to contact investigators.

Residents who had initially reported missing family members, but have since located them, are also urged to contact police, Brunet said.

The explosions and fire took place near the downtown core -- a popular area during the busy summer nights -- forcing 1,500 and 2,000 people from their homes in the early morning hours of Saturday.

A Facebook group was quickly set up to help track down residents who couldn’t immediately be reached by phone.

Zeph Kee said he was about five kilometres away from the derailment when the explosions began.

"There are still some people I know that are missing," he told CTV News Channel Sunday. "There are some people that my friends know that haven't been found yet. It's devastating."

The Red Cross had set up a shelter Saturday afternoon to take in residents.

Lac-Megantic Mayor Colette Roy-Laroche said Sunday that drinking water was available to residents again, after fire crews were able to access a water reservoir overnight and seal a leak.

However, a boil-water advisory remains in effect until further notice, she said.