Railway officials said the single railcar collided head-on with the buffer stop, causing a huge explosion and fire. At least 47 people were also injured, many of them critically, and officials said the death toll could rise.
The deadly blaze blasted through people on the platform in the busy Ramses Station in downtown Cairo. A surveillance video showed the moment of impact when the car barreled past men and women walking by and engulfed them in flames and smoke. Charred bodies lay on the platform, and a man in flames ran down a staircase in panic, according to other photos and videos posted on social media.
Egypt's Prosecutor General Nabil Sadek said investigators determined the locomotive's conductor had left his car to fight with another conductor whose railcar was blocking his. But the conductor left without putting on the brakes and the other car began moving backward, freeing the locomotive, which then gathered speed and hit the concrete-and-metal barrier, exploding.
"The driver left the railcar without taking any measures to brake it," Sadek said in a statement. Sadek put the death toll at 20 while health officials said at least 25 people were killed and dozens more were injured in the crash and ensuing fire. Some of the bodies were burnt beyond recognition and DNA tests were carried out to determine identities.
The driver of the railcar has been under interrogation and Sadek said the investigation was continuing. The deadly accident prompted Transportation Minister Hisham Arafat to resign his post, according to a statement released by the Cabinet office.
The Ramses district is among the busiest and most crowded areas of Cairo. The state railway agency briefly halted all train traffic and ordered the evacuation of the station. The accident triggered an online debate among many Egyptians, with many blaming the government for not improving railway services in Egypt, even after a series of deadly accidents. Several noted previous statements by President Abdel-Fattah el-Sissi arguing about spending billions of pounds on improving trains.
Video from surveillance cameras showed flames ravaging the station's interior. One video that surfaced on social media showed men and women carrying bags and personal belongings and walking on the rail platforms as the train car crashes and explodes.
Another showed men and women running and searching for exits after the explosion. A man is seen running back and forth, his shirt on fire, until another man rushes to pour water on him. Mohammed Said, head of the Cairo Railroad hospital, said at least 25 were killed but that the death toll could rise.
Many of the wounded were in critical condition, mostly suffering severe burns, said Egyptian Health Minister Hala Zayed. Prime Minister Mustafa Madbouli vowed harsh punishment for those behind the accident.
Egypt's railway system has a history of badly maintained equipment and poor management. Official figures show that 1,793 train accidents took place in 2017 across the country. In July 2018, a passenger train derailed near the southern city of Aswan, injuring at least six people and prompting authorities to fire the chief of the country's railways.
In March last year, President Abdel-Fattah el-Sissi said the government lacks about 250 billion Egyptian pounds, or $14.1 billion, to overhaul the run-down rail system. El-Sissi spoke a day after a passenger train collided with a cargo train, killing at least 12 people, including a child.
In August 2017, two passenger trains collided just outside the Mediterranean port city of Alexandria, killing 43 people. In 2016, at least 51 people were killed when two commuter trains collided near Cairo.
The deadliest train crash took place in 2002 when over 300 people were killed when fire erupted in speeding train traveling from Cairo to southern Egypt.