A report by the Rail Accident Investigation Branch (RAIB) found Network Rail had not properly repaired a set of points in the Princes Street Gardens area prior to the ScotRail service derailing there on July 27.
Inspectors said the infrastructure company had not learned the lessons of two similar derailments – at Waterloo in London in 2006 and at Glasgow's Exhibition Centre in 2007.
Only the driver and conductor were on board at the time and neither were injured. But two lines west of Waverley Station were closed for two days, causing many delays and cancellations.
The accident, which occurred at the height of the evening rush-hour, saw all routes north and west of the capital grind to a halt. Services on the main Glasgow to Edinburgh route took two days to return to normal as repairs to the failed set of points and inspections of other points were carried out.
An interim report last August found the points over which the train derailed were heavily worn. However, yesterday's full report by RAIB, an agency of the Department for Transport, said this was down to maintenance shortcomings by Network Rail.
An inspection carried out three days before the accident had found the points to be capable of causing a derailment.
Maintenance workers then attempted a "grinding repair" – a standard procedure – despite the set of points being too worn for this to be effective, the RAIB report said.
An inspection carried out later failed to identify the points were still in an unsafe condition, the inspectors added.
The report said: "The required prior scoping of the repair, which might have identified the unsuitability of the switch rail for repair by grinding, was not carried out."
It added that an underlying factor was the lack of guidance on when points were not able to be repaired by grinding.
RAIB made five recommendations to Network Rail, including a review of some its maintenance standards and inspection procedures.
The inspectors highlighted the difficulty of undertaking repairs on the western approach to Waverley Station, one of the busiest parts of Scotland's rail network, due to the pressure to keep the four lines open for passenger services.
As a result, the maintenance crew did not properly plan the repair work in advance, an approach that could have led them to replacing the points instead of grinding them down, the RAIB report concluded.
"The investigation learned it was not practicable for the Edinburgh delivery unit to scope grinding repairs with short deadlines in sites like Princes Street Gardens with limited access," the inspectors said.
"This was because there was not enough time to obtain a line blockage to visit the site prior to the repair."
Network Rail said it had reviewed staff training as a result of the accident and would study the RAIB report closely.
A spokesman said: "Safety is our number one priority and we will review the report closely.
"We have already made changes in how we manage the maintenance of points and have reviewed staff training as a result of this incident."