Egypt's transportation minister Mohammed Mansur resigned on Tuesday over a train crash that killed 18 people earlier this week, the official news agency MENA reported.
The agency said President Hosni Mubarak has accepted Mansur's resignation, in which he took responsibility for the deadly accident that also injured 36 people.
The accident happened when a passenger train drove full-speed into the back of another southwest of the Egyptian capital Cairo on Saturday.
The first train, heading to Fayyum, 100 kilometers (65 miles) from the capital, made an unscheduled stop after the driver spotted a water buffalo on the track, it said in a statement.
But signalman Sayyed Ali Tehewi left his cabin early to catch a train home, causing a second train to crash into the first.
In a tragic twist, Tehewi had left to catch that second train, on a southbound route from Cairo to Assyut, 400 km (250 miles) from Cairo, and died in the crash, the prosecutor's office said.
Egypt's national railway system is the biggest in the Middle East, with early 5,000 km (3,150 miles) of track, according to Egyptian National Railways, which employs 86,000 people.
A series of road and rail accidents in Egypt in recent years has triggered an outcry over the government's handling of transport safety.
Saturday's accident took place in al-Ayyat, which in 2002 was the scene of Egypt's worst rail disaster when fire ripped through seven carriages of an overcrowded passenger train, killing at least 360 people.
A train crash in northern Egypt killed 44 people in 2008, two years after a crash that killed 58 people.