A train was derailed in the Highlands after it was "wrongly diverted" to a different line due to a wiring error in the signalling system. 

Services across Scotland were cancelled due to the derailed test train at Dalwhinnie on April 10, 2021. 

Nobody was injured in the incident but the outcome "could have been much worse", a new report from the Rail Accident Investigating Branch (RAIB) warned. 

The train was only travelling at 33mph at 3am on the day and was not carrying any passengers.

Chief inspector of rail accidents, Andrew Hall, said some causes of the derailment bore an "alarming similarity" to an accident at Clapham Junction in 1988, which saw 35 people die.

He added there were also similarities to a crash at Waterloo in London in 2017.

"These accidents share a common theme, that an undetected wiring error resulted in the failure of the signalling system," he said.

"At Dalwhinnie, this meant that the signalling system did not detect that some points were in an unsafe position, resulting in the derailment of a train. Thankfully no one was injured.

"However, the train could have been carrying passengers and travelling at a much higher speed, and the outcome very different."

The wiring error saw only one set of the double-ended points on the railway to move towards the corect position. 

When the front of the train directed over the crossover it forced apart the points at the trailing end.

This prompted the signalling system to detect the points were not in the correct position and sent a command to amend the issue. 

However, this saw the points move while under the train and in turn derailed the back carriages.

Mr Hall said: "Wiring within a signalling system is safety critical and needs to be carefully checked and tested when engineering work is carried out.

"It is essential that long-established processes and assurance principles, introduced and developed as a result of earlier accidents, are followed.

"When essential technical information is not readily available, and testing is not completed or carried out in a truly independent manner, the consequences can be very serious.

“Those who don’t remember the past are condemned to repeat it, has been said in many ways by many people.

"When it comes to fully understanding the importance of hard-learned lessons around the wiring of railway signalling, the accident at Dalwhinnie needs to act as another salutary reminder to the industry.”

READ MORE: Plea over Ben Nevis hikers causing a stink on UK's highest mountain

The wiring error was the result of two unwanted conductors, a wire strap and a metal link, within the replacement trailing end point machine. 

The report details a number of instances in which the error should have been noticed.

It further added that there was a lack of clarity in Network Rail’s signalling maintenance standards in regard to working arrangements between those carrying out the work and those testing it.

This issues was as a probable underlying factor.

The RAIB made five recommendations to Network Rail to ensure the incident did not occur again, including to their process recording the progress and findings of signal maintenance testing.