A ScotRail electric train has been damaged after being wrongly signalled onto a non-electrified track in Edinburgh.
A “thorough investigation” has been launched after the four-carriage set became stranded near Haymarket Station.
The ScotRail Alliance, that includes Network Rail, which is responsible for signalling, said lessons had been learned.
The train had to be rescued by a ScotRail diesel train.
The operator said “minimal” damage had been caused to the train’s pantograph, which connects it to overhead wires.
However, ScotRail refused to say how much the incident last Thursday had cost.
A source with close links to the rail industry told The Scotsman: “I think there will be people with red faces over this incident.
“Just how much that signalling error cost in manpower and associated costs, I dread to think.
“A signaller set the route onto a diesel-only line at Haymarket depot from platform 0 at Haymarket Station, which has no overhead wires.
“The driver didn’t see the warning sign that electric trains must stop here, as it was mounted on a post on the off-side - not the side it is driven from.
“The restricted visibility caused by the corridor connector on the front of the train meant this was missed, resulting in the electric train being stranded off the wires.”
The train involved was a Class 380, which is used on the Edinburgh to North Berwick and Dunbar routes.
The ScotRail Alliance said: “On 29 December, an electric train – not in passenger service - was incorrectly signalled into an unwired section of track around 9:30pm.
“A diesel train was used to move the unit to Haymarket depot.
“There was minimal damage to the pantograph, but this has now been fixed and the train is back in service.
“There was no impact on passenger services.
“The incorrect signalling of trains is a very rare occurrence.
“When such incidents happen, immediate safety precautions are taken to prevent other trains entering the same section of track.
“The matter is now the subject of a thorough investigation and any lessons learned will be acted upon.
“An immediate lesson learned relates to the head code of the trains returning to the sheds. That has been acted upon to prevent such a repeat.”