Egypt's prosecution has ordered the detention of a train driver following a deadly train crash near the coastal city of Alexandria that killed 43 people and injured scores.

A train coming from Cairo, Egypt's capital, crashed into the rear of another that was waiting at a small station in the district of Khorshid, just east of Alexandria.

Prosecutors ordered on Sunday the driver of the Cairo train to be detained for 15 days pending investigation, and requested blood and urine samples to test for drugs.

In a meeting with President Abdel-Fattah el-Sissi on Saturday, Transport Minister Hesham Arafat blamed the accident on human error.

Egypt's railway system has a poor safety record, mostly blamed on decades of badly maintained equipment and poor management.