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

The accident also injured 123 people, the ministry said.

The crash, near the Khorshid station between the Alexandria and Cairo route, derailed the engine of one train and two cars of the other, state news agency MENA said.

Footage broadcast on state television 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.

Egypt's transport minister has ordered an investigation into the crash, pledging to "hold accountable" whoever was responsible, state television reported.

A security source said a railroad switching error was the most likely cause of the collision. He gave no further details.

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.

They had been returning from a wedding when the train ploughed into their bus and a truck at a railway crossing.

That accident came months after a train carrying military conscripts derailed, killing 17 people, and almost a year after 47 schoolchildren were killed when a train crashed into their bus.

Egyptians have long complained that the government has failed to deal with chronic transport problems, with roads as poorly maintained as railway lines.

In Egypt's deadliest train accident in 2002, 373 people died when a fire ripped through a crowded train south of the capital.