The rail network between Picton and Christchurch has been restored for the first time since November's devastating Kaikōura earthquake.
Kiwirail has welded the final piece linking the tracks together near Rakautara, 40km north of Kaikōura.
The rail operator completed the work, which cost tens of million of dollars and involved more than 1300 workers, three months ahead of schedule.
"We've had about five kilometres of track to realign away from the hills, 5000 new concrete sleepers installed. We've had to put new formation under about 12 kilometres of track. It's been a huge infrastructure effort," Kiwirail chief executive Peter Reidy said.
Mr Reidy said there was still work to be done to make sure the line was fit to carry trains, but he expected to start operating moving freight along the line by the end of the month.
"We are planning to have two freight trains a night. We were running three (before the quake)."
That would lift the load along the congested inland road that has become the main route through the upper South Island, with about 2000 fewer trucks needed.
Transport Minister Simon Bridges said completing the network was an important milestone.
"It will also help with the reinstatement of State Highway 1 and the railway by moving materials to worksites along the route," Mr Bridges said.
Transport operators have also welcomed the completion of the rail line repairs.
Road Transport Forum chief executive Ken Shirley said it was a critical milestone in the recovery process.
"(This) will start to reduce the pressure on trucking companies to solely maintain the flow of goods across the top of the South Island."
Kiwirail said while it would cut times in moving goods between Auckland and Christchurch, restrictions on the route meant travel times would still be two to three hours slower than normal.
"Stage Two, which is the next six months, will take some of the track and move it further away from some of the slips. There are about three or four areas where we will be moving the track two to three hundred metres away from the embankments," said Mr Reidy.
He said work had been done to scale the cliff faces back, bolt mesh over some of the biggest slips and build rock shelters to mitigate the risk from another major earthquake.
"But of course you can never be foolproof."
Mr Reidy said Kiwirail was still working through the final cost of the quake with its insurer.