Two trains collided in Egypt's coastal city of Alexandria on Friday, killing 37 people and injuring 123 others, the health ministry said.
One eyewitness said the two trains mounted into the air "forming a pyramid" after they slammed into each other at a suburban station on the edge of the Mediterranean port city.
President Abdel Fattah al-Sisi ordered authorities to establish who was responsible for the crash, which left bodies strewn on the ground around wrecked carriages.
The collision at 2.15pm, near Khorshid station at the edge of Alexandria, derailed the locomotive of one train and two cars of the other, the Egyptian Railway Authority said.
State newspaper al-Ahram said earlier that 36 bodies had been taken to hospital morgues in Alexandria province.
As rescue teams pulled dead and injured from the damaged rail wagons, public prosecutor Nabil Sadek ordered an urgent investigation.
A railroad switching error most likely caused the crash, a security source said without giving further details.
One resident, Hoda, was standing on her rooftop when she saw the trains collide.
Read more on Egypt:
Egypt received $40 Billion in foreign investments since currency devaluation
Egypt's rate of inflation rises to high not seen since 1986 amid energy subsidy cuts
Emirates adds to Cairo services
"They rose in the air forming a pyramid when they collided," she said. "I started to scream from the rooftops for people to grab some sheets and run."
A health ministry spokesman said 75 ambulances had been deployed at the crash scene. Some people were still stuck inside the trains, a medical official told state TV.
State television showed dozens of people crowding around the damaged train cars, with bodies strewn on the ground.
"The train I was riding was going very quickly," said passenger Moumen Youssef. "I found myself on the floor. When we came out, we found four train cars crushed and a lot of people on the ground."
Egyptians have long complained that successive governments failed to enforce basic safeguards for the railways, leading to a string of fatal crashes.
In 2012, a train ploughed into a school bus south of Cairo and killed 50 people, mostly children, inflaming public anger over Egypt's antiquated transport network.
In Egypt's worst train disaster, a fire tore through seven carriages of an overcrowded passenger train in 2002, killing at least 360 people.