Services were suspended after the two rear wagons on a north-bound fright train derailed at Warepa, about 17km south of Balclutha, on Friday night, KiwiRail public affairs manager Kevin Ramshaw said.
The wagons, which each contained 20 tonnes of coal, stayed upright and connected to the train and the locomotive engineer was unaware of the derailment until alerted by train control, he said.
About 16km of track was damaged and up to 20,000 sleepers needed to be replaced.
Mr Ramshaw said local repair crews had been joined by crews from Greymouth and Christchurch and the repairs should be completed by Wednesday afternoon.
Services would resume with a 25kmh speed restriction, he said.
The cause of the derailment has not yet been established.