Updated

Police in Canada said Thursday they had ended a search for remains of five victims still missing from a rail disaster earlier this month that left 47 people dead.

At the same time, investigators from the Transportation Safety Board said they were withdrawing from the picturesque Quebec town that was heavily damaged in the explosion and fire caused by a runaway train.

They said their investigation would however continue from their offices in Ottawa.

The remains of 42 people have been recovered from the ruins of downtown Lac-Megantic, where some 30 buildings were destroyed in the explosion of a 72-car train laden with oil.

"The work has been done thoroughly," Lieutenant Guy Lapointe, a spokesman for the Quebec provincial police, told reporters.

"Today, we have the certainty that everything that could be done has been done," he said, announcing "the end of the crime scene investigation."

"For the moment, the toll remains the same: 42 victims recovered out of 47 dead," he said.

A representative of the coroner's office, Genevieve Guilbault, said material recovered at the site could still be used to confirm the identities of the victims.

Guilbault said the remains of 38 people have been "formally identified" so far.

"The work of identifying the victims will continue to be actively pursued in the coming weeks and months," she said.

Quebec authorities are at loggerheads with the US railway company whose train caused the disaster over the cost of cleaning up and repairing the damage.