Network Rail has been fined £6.7m after admitting a series of failings which led to the deaths of three people in a train crash near Stonehaven.
The Aberdeen to Glasgow service derailed at Carmont after hitting a landslide following heavy rain.
Network Rail pleaded guilty to a number of maintenance and inspection failures before the crash in August 2020.
It also admitted failing to warn the driver that part of the track was unsafe or tell him to reduce his speed.
Driver Brett McCullough, 45, conductor Donald Dinnie, 58, and passenger Christopher Stuchbury, 62, died in the crash.
The judge, Lord Matthews, said no penalty he could impose compensate for the loss suffered by the families of those who died and of the six people on board the train who were injured.
He said opportunities to take appropriate action may have been missed and that the level of culpability was high, with a large number of people exposed to risk over the years.
The weather conditions before the crash had been “unprecedented”.
Lord Matthews added that the rail operator would have been fined £10m if the case had gone to trial.
The High Court in Aberdeen heard that the six people injured in the crash were left with physical and mental scars.
The train hit a landslide near Stonehaven in August 2020 after heavy rain in an area where a drainage system had been incorrectly installed.
The 06:38 service to Glasgow had been unable to complete its journey due to the conditions and was returning to Aberdeen when the accident happened.
A recording of the driver showed he queried with a signaller if any reduced speed was needed to return north. He was told everything was fine for normal speed.
The train struck debris from a landslide on the track, derail and collided with a bridge parapet.
Tragic circumstances
Representing Network Rail, defence counsel Peter Gray said the three men died in “the most appalling and tragic circumstances”.
He said the company extended the “deepest and most profound sympathies” to relatives, and that what happened had “shook Network Rail to its core”.
“Its acceptance of its shortcomings was both immediate and genuine,” he said.
“Its cooperation with all investigations was absolute. And its response to ensure so far as reasonably possible that such tragedy should not be repeated was comprehensive and continues.”
He added that the the guilty plea had avoided any need for a potentially distressing, lengthy and complex trial.