MEXICO CITY (AP) — A freight car carrying bulk corn derailed early Thursday in the northern suburbs of Mexico City, killing five people as it rolled over and crushed part of a house near the tracks.

The victims were apparently crushed as they slept before dawn. It was unclear if they were killed by rubble from a wall knocked over by the train car, by the car itself or by the large amount of corn that spilled out of the car.

Mexico's Transportation Department said the derailment was under investigation and the section of track was operated under a concession by the Ferrocarril y Terminal del Valle company, known as Ferrovalle. The train car was owned by Kansas City Southern de Mexico.

In a statement, Ferrovalle said that, actually, two train cars had derailed, and that one hit two houses. The company said a sixth person had been injured and released from a hospital.

Ferrovalle said the cause of the derailment was under investigation. In other parts of Mexico, thieves have been known to place objects on the tracks to force trains to stop so they can rob the contents of freight cars. It was unclear if that was the case in the Thursday accident.

Photos of the scene showed the car's wheel-truck broken loose, rails separated from ties and the car resting on its side after partly falling down an embankment and onto the house.

Homes are routinely built on or very near railway rights of way in Mexico.