The railway at the scene of a fatal derailment in Aberdeenshire in August will reopen on Tuesday.
The driver, conductor and a passenger died when the Aberdeen to Glasgow service crashed at Carmont near Stonehaven after heavy rain.
An interim report said the train hit washed-out rocks and gravel.
Confirming the date for the reopening, ScotRail said its thoughts were with the family, friends and colleagues of the three men who died.
The company added: "Our hearts remain broken and will do for some time. Thank you all for your patience and understanding during this time."
The derailment, which led to the deaths of driver Brett McCullough, 45, conductor Donald Dinnie, 58, and passenger Christopher Stuchbury, 62, is being investigated by the Rail Accident Investigation Branch.
Six other people were injured in the incident.
Network Rail has been laying hundreds of metres replacement track as part of a "complex" repair operation.
Repairs have been carried out to a bridge parapet and telecoms cables have been put back into place.
Transport Secretary Michael Matheson thanked all those involved in the recovery and repair operations.
He tweeted: "Our thoughts remain with the families and friends of Brett McCullough, Donald Dinnie and Christopher Stuchberry, as well as the other staff and passengers affected by this tragic accident."
ScotRail is operating a shuttle service between Aberdeen and Stonehaven and between Dundee and Montrose while the line is closed.
A replacement bus service also remains in place between Dundee and Stonehaven, and between Dundee and Aberdeen.
The derailment took place when the 06:38 service from Aberdeen to Glasgow struck a landslip 1.4 miles north east of Carmont after a night of heavy rain.
Alex Hynes, managing director of Scotland's Railway, said engineers had worked "around-the-clock" to reopen the line.
He said: "We continue to work closely with accident investigators as we seek to learn the lessons of this tragedy and make our railway as safe as possible for our people and our passengers.
"Our thoughts continue to be with the families and friends of Brett, Donald and Christopher and with the other passengers and colleagues who were affected by the accident."