A train engine car loaded with fuel slammed into a platform in Cairo’s main train station on Wednesday, causing an explosion and a fire that killed at least 25 and injured 47.
Transport Minister Hisham Arafat resigned hours after the accident, Egyptian state television reported. Prime Minister Mostafa Madbouli accepted Mr Arafat's resignation.
Police and hospital officials said the death toll was likely to rise as emergency teams search for more victims at the charred site of the accident, which happened about 10.15am local time. Most of the injured suffered serious burns.
Some of those killed were so badly burnt that they could not be recognised, police said.
Men and women who had moments earlier stood at a platform carrying bags or suitcases were swiftly engulfed by flames.
One man poured water on another who was on fire. Another fell down a staircase and rolled on the ground trying to snuff out the flames before he ran upstairs again and disappeared.
A platform was strewn with charred bodies and civilians helping the injured as they lay on the ground. Thick, black smoke hung over Ramses station, in the busiest part of central Cairo.
Ambulances and fire brigades, with screaming sirens piercing the mid-morning air, rushed to the station, which was cordoned off by police.
Central Cairo’s usually congested traffic briefly ground to an almost complete halt.
President Abdel Fattah El Sisi, standing alongside visiting Albanian President Ilir Meta, said he gave orders for anyone found responsible for the accident to be held accountable.
At the station, Mr Madbouli went further: “We must identify those responsible and mercilessly hold them accountable."
Egypt’s chief prosecutor, Nabil Sadeq, ordered an investigation into the accident.
Among those expressing sadness and offering their condolences on social media was Egyptian star striker Mohamed Salah, who said he hoped for the speedy recovery of all the injured.
The engine car had pulled out of a shed near the station and pulled over at platform six, which serves trains bound for north and east of Cairo, including the city of Alexandria.
But the car slammed too hard against the barrier at the end of the platform, right at the spot where scores of passengers wait for their train.
Mr Sadeq said a preliminary investigation showed that the driver of the engine car, who had been arrested, left the vehicle without putting on the brakes, allowing it to accelerate towards the barrier.
The driver left to admonish another engine car driver who had minutes earlier blocked his way, he said.
The blast was so strong it blew people on to the rails and caused panic among the hundreds of passengers.
Officials said it took firemen nearly an hour to put the blaze out. Rail traffic from and to Ramses station resumed after a brief suspension.
The government is in the process of a costly drive to modernise the country’s antiquated rail network, which was established in the 19th century. Authorities have been buying train cars from European makers and striking partnerships with some of them to build the cars at home.
There are also plans to fully computerise the signal system, the failures of which, along with human errors, have caused deadly accidents in recent years.
The last fatal rail accident in Egypt was in March last year, with 15 people killed when a cargo train collided with a passenger train heading to Cairo.
Two years ago, 41 passengers were killed and 133 wounded when two trains collided in Alexandria.
Egypt's deadliest railway accident was in February 2002, when some 360 people died in a fire that erupted on board a train shortly after it left Cairo.
A day after last year's accident, Mr El Sisi said his government needed about $14 billion to overhaul the network, where fares have for decades been heavily subsidised.
He has made it a priority since taking office in 2014 to upgrade the country’s infrastructure and basic services, but he has made it clear that doing so without removing state subsidies from all goods and services would never yield enduring results.