Egyptian prosecutors Wednesday ordered the detention of an engineer pending an investigation into a train crash a day earlier that killed four people near Cairo.

The passenger train slammed into a concrete barrier at a station in Qalyub city while traveling Tuesday to the Nile Delta city of Menouf, prosecutors said in a statement. As a result, the locomotive and the first carriage were knocked off the tracks.

NORTHERN EGYPT TRAIN DERAILMENT KILLS 2, INJURES 16

Initial investigations blamed high speed for the crash, which left at least 23 people injured, according to the statement.

FOX News Middle East graphic

An engineer has been detained in connection to a train crash that killed four people in Egypt this week.

Prosecutors said the engineer, the train's driver, would be detained for four days while an investigation continues.

ARCHAEOLOGISTS IN EGYPT UNEARTH SPHINX-LIKE ROMAN-ERA STATUE

It was the latest train crash in Egypt, where railroad accidents claim many lives every year.

CLICK HERE TO GET THE FOX NEWS APP

Following a series of deadly crashes in recent years, the government embarked on an ambitious plan to modernize the country’s railway system, which has a long history of mismanagement and poor maintenance.