A freight train slammed into a passenger bus and dragged it down the tracks in central Mexico on Thursday, killing 22 people and injuring 14, police said.

The bus was practically flattened by the force of the impact at a railroad crossing in Cuautitlan, just north of Mexico City.

The Mexico State government said 22 people were killed and another 14 people injured, many of them hospitalized in serious condition.

"Eleven bodies at the morgue ... have not yet been identified," the state attorney general's office in Mexico State — which borders Mexico City — said in a statement.

It remained unclear exactly how the collision occurred. State prosecutors said initially that the driver of the bus apparently tried to beat the train at a crossing.

But an assistant state prosecutor in Cuautitlan, Alejandro Jardon, told the government news agency Notimex that investigations indicated the bus had stalled as it crossed the tracks, and the driver — unable to restart it — fled as the train approached, leaving passengers to their fate.

The bus driver was detained two blocks away, shaken but unharmed. The vehicle was operated by a private bus company known as Autotransportes Mexico-Melchor Ocampo SA, according to state prosecutors.

Authorities said the train was pulling 36 empty freight cars at the time. The driver and the train conductor were detained for questioning.