Transport chiefs have hailed the "mighty effort" to rebuild the earthquake-torn railway between Picton and Christchurch, as the last weld went into place near Rakautara, north of Kaikoura.
The massive 7.8 quake in Kaikoura in November 2016 wrought major damage, twisting train tracks, destroying bridges and tunnels and bringing down enormous slips.
More than 1500 workers had worked for nine months to get the track joined up again, KiwiRail Chief Executive Peter Reidy said.
"Over the whole project - road and rail - an average of 150,000 person hours are being worked each month. On the rail side 150km of line has been tamped and made ready for trains.
"Five thousand new concrete sleepers have been laid, the formation under 12km of track has been rebuilt, and 5km of track has been realigned."
The track should open to freight within a month, he said. Low-speed, low-frequency services will use the line initially at night so rebuilding work can continue during the day.
About 2000 trucks are expected to come off the roads once trains start running again.
Construction work on State Highway 1 is expected to move much faster once trains can move materials up and down the coast.
Road Transport Forum chief executive Ken Shirley congratulated those involved in the rebuild.
"Trains can begin to use the line, which will start to reduce the pressure on trucking companies to solely maintain the flow of goods across the top of the South Island."
"Trucking companies have done an amazing job since November's quake forced all freight on to the alternative route over the Lewis Pass.
"Despite dire predictions and incredibly trying circumstances, including poor road conditions and a much longer journey time, there has been minimal disruption to the movement of freight up and down the country."