Engineers are working round the clock to reopen the east coast mainline between Dundee and Carnoustie after extensive damage to the track, according to Network Rail.
Rails and sleepers both suffered damage when a freight train derailed in the early hours of Monday.
Ironically, it is the railway tracks the train was carrying that have made heavy work of the repairs.
A spokesman for Network Rail, which is carrying out the repairs, said welders spent Monday night cutting the tracks into more manageable pieces.
He said: “We are still on course for Thursday but one of the problems has been the sizes of the pieces of track.
“They come in long sections which welders then cut to size when they when they are being laid.
“We had a team of welders down on Monday cutting the rails into smaller sizes to they could be removed, and then they have been removing the railway cars from the track. The train derailed on a narrow stretch of track by City Quay in Dundee and the inaccessibility the location has also hindered repair works.
“We have been on site 24/7 since about 2.30 on Monday morning but it is quite a challenging job because it’s such a narrow area.
“There isn’t a lot of room to get people in and working but things are progressing and should be done by Thursday morning.”
The derailment has been causing headaches for passengers since Monday.
Trains from Edinburgh and Glasgow to Aberdeen are terminating at Dundee, and services from Aberdeen to Edinburgh and Glasgow terminate at Carnoustie.
Replacement buses are transporting passengers between Dundee and Carnoustie but ScotRail is advising passengers to make their own alternative arrangements and those who must travel by train should expect “significant delays”.