The engineer of an Amtrak passenger train applied the emergency brakes five seconds before it struck a digger sitting on the same track, killing the operator and a track supervisor, US officials said.
The train was travelling at 106mph in a 110mph zone when it hit the piece of construction equipment in Chester, about 15 miles outside of Philadelphia, the National Transportation Safety Board (NTSB) said yesterday.
No-one on board the train was killed, but more than 30 passengers were injured. Their injuries were not considered life-threatening.
NTSB investigator Ryan Frigo said videos showed construction equipment on the track and a contractor's equipment on an adjacent track before Sunday morning's crash.
The event data recorder and forward-facing and inward-facing video from the locomotive were recovered, officials said.
Amtrak issued a statement on Monday night, saying it was "deeply saddened" by the deaths of the two workers and the injuries suffered by passengers.
"We are working with the NTSB to identify the issues that led to this incident and will make any needed changes immediately," Amtrak said.
Trains on the Northeast Corridor have now resumed regular service.
The train was heading from New York to Savannah, Georgia, at about 8am on Sunday when it hit a piece of equipment in Chester. The impact derailed the lead engine of the train, which was carrying more than 300 passengers and seven crew members.
The Delaware County Medical Examiner's Office identified the victims as digger operator Joseph Carter Jr, 61, of Wilmington, Delaware, and Peter Adamovich, 59, of Lincoln University, Pennsylvania. They both died of blunt force trauma.
The union representing Mr Carter said a total of three workers have now been killed on the job on Amtrak's Northeast Corridor since March 1. That raises questions about worker safety, the Brotherhood of Maintenance of Way Employees said.
Amtrak introduced a set of new safety protocols effective March 15.
It says violations are handled with zero tolerance, and some cases lead to immediate dismissal.
Rail safety workers said track workers are supposed to double-check their assignments with dispatchers to be sure they are not working on or around an active track.
"Typically, the dispatcher has to give very specific permission for maintenance ... equipment, like a backhoe (digger), to be on the track. They have to take the track out of service for a defined distance and a defined time period," said professor Allan Zarembski, who teaches railway engineering at the University of Delaware.
"And then, they have to confirm that they understand it, repeat back the instructions, and only then can they get on the tracks."
A Minnesota company called Loram Maintenance of Way had several employees working in the area.
Loram official Tom DeJoseph said the company was carrying out maintenance on the ballast between the railway ties.
He estimated the company had three or four people working there at a time and more at shift changes.
He declined to say if any of them witnessed the crash.
The derailment comes almost a year after a speeding Amtrak train from Washington, DC, to New York City went off the tracks in Philadelphia. Eight people were killed and more than 200 were injured.
The exact cause of that derailment is still under investigation, but authorities have said the train had been travelling at twice the speed limit.
Nearly three decades ago, an Amtrak train struck maintenance equipment on tracks in Chester, near the site of Sunday's derailment. More than 20 people were injured in that January 1988 crash. The NTSB determined that an Amtrak tower operator had failed to switch the train to an unoccupied track.