The death toll from the collision between two trains in Egypt on Friday has risen to 36, the health ministry said in a statement.

Two trains collided outside the Egyptian city of Alexandria on Friday killing 36 and injuring 123 people, the ministry said Sharif Wadi, an assistant to the health minister, told state television. However, the ministry also said that the number of casualty may rise due to the seriousness of many injuries.

Footage on the state broadcaster showed one train had partly keeled over in the crash, and medics were seen moving the dead and injured to ambulances.

State television, citing transport ministry officials, reported that the crash was probably caused by a malfunction in one of the trains that brought it to a halt on the rails.

The other train then crashed into it.

The dead and injured were initially placed on blankets by the sides of the tracks amid farmland on the outskirts of the Mediterranean city.

Wadi told state television that most of the injured have been taken to hospital.

It was the deadliest train accident in the North African country since a November 2013 collision between a train and a bus killed 27 people south of Cairo.

In 2002, 373 people died when a fire ripped through a crowded train south of the capital.