LAC-MEGANTIC, Quebec — The search is ending for five bodies that remain missing after an oil train derailed and exploded in a Quebec town, killing 47 people last month.

Quebec provincial police Lt. Guy Lapointe said Thursday that they have done everything possible to find the remaining bodies.

The coroner’s office says it has identified 38 bodies and will work to identify the rest.

The Transportation Safety Board of Canada also announced that it was finishing its on-site operations in Lac-Megantic.

A parked Montreal, Maine & Atlantic Railway train with 72 tankers of crude oil rolled down an incline, derailed and slammed into downtown Lac-Megantic on July 6. Several tankers exploded, destroying 40 buildings in the lakeside town of 6,000.