The rail line running from Auckland to Whangarei has been given a $95 million lifeline by the Government.
The ailing Northland freight line has become the latest recipient from the $1-billion-a-year Provincial Growth Fund, Regional Economic Development Minister Shane Jones and State Owned Enterprises Minister Winston Peters announced on Friday.
The funding - about $94.8 million in total - will see 54km of the 181km North Auckland Line track between Swanson and Whangarei replaced.
It will also swap out five of the 88 bridges on the route and fix 13 tunnels, along with 50,000 sleepers.
Peters said the line would have likely become unsafe and closed within five years without the fix, effectively leaving Northland rail cut off from the rest of the country.
"That's unacceptable and unfair to the people of Northland," he said.
The investment has been touted as benefiting freight services to the region.
"The maintenance work will make the line more resilient to weather events and freight services more timely and reliable," Jones said.
"Not only does it set the right conditions for KiwiRail to grow its freight business, wherever possible KiwiRail will be using Northland based contractors to carry out work."
The money for the project is part of $331 million set aside in the Government budget this year for upgrades to train tracks and other infrastructure.
Friday's announcement - made at the Helensville train station - did not include mention of a broader $1.3 billion plan for an upgrade of rail linking Auckland to Marsden Pt, which the Ministry of Transport said was a pre-condition of Northport becoming a major, inter-regional container port.
A study by the ministry found while the economic benefits of that plan would be "marginal", rail in the area needed large-scale investment to avoid becoming unsafe in five years' time and that an expansion could generate significantly more freight demand for the region.