A signalling fault caused a train in Dalwhinnie to wrongly divert from one line to another, causing it to derail.
The line between Perth and Inverness was shut for almost a week earlier this month after a train came off the tracks in the early hours of the morning.
The high-speed Scotrail train was being used for testing, including examining the stepping distances from the train doors to the platforms and the length of the train.
It was undertaking these tests when its three rear bogies came off the line near Dalwhinnie at about 3am on April 10.
The train was travelling at about 33mph at this time and had five people on-board, who were uninjured.
It is being investigated by the Rail Accident Investigation Branch (RAIB) who revealed that the train had been diverted from the route’s up line to the down line at a crossover just south of Dalwhinnie station.
This was an incorrect manoeuvre for the train, with the points on the track not in the right position.
The signalling system had not detected this and instead indicated for the driver to proceed on that route, which it did before coming to a stop about 290m beyond the crossover.
Some of the track was damaged, along with signalling equipment and the derailed portion of the train.
The RAIB will look into why the signalling system did not detect the points were in an incorrect position.
It is also looking into how the points were able to move as the train passed over and will identify the sequence of events that led to the accident.
In addition, the RAIB will explore different factors associated with the installation, testing and maintenance of the point machines that operated the crossover.
Their investigation is independent of any investigation by the railway industry or the Office of Rail and Road.
They will publish their findings, including any recommendations to improve safety following this, and the report will be available on their website.