Thousands of railroad sleepers are rotting and may have been responsible for two derailments, KiwiRail chief executive Jim Quinn says.
Seven thousand of the 100,000 wooden sleepers imported from an Australian supplier have had to be replaced at a cost of millions of dollars after they were found to be showing signs of premature decay.
Two derailments - one on the Napier-Gisborne line and one on a north Auckland line - earlier this year are suspected to have been impacted by rotting sleepers, Mr Quinn says.
The replacement of the sleepers, expected to be completed by next year, is at a cost of between $250 and $1000 each.
Mr Quinn said KiwiRail was in a legal dispute with the supplier of the sleepers.
"We have taken appropriate steps to manage the problem and ensure the safety of staff and commuters: we simply would not run services if we suspected the network was not safe," Mr Quinn said.
He said the decay was believed to have been present in the timber when it arrived in New Zealand.
Some of the 7000 rotting sleepers were found with "advanced signs" of decay.
"Wooden sleepers are required to be compliant with the Australian standard, which specifies they must last for at least 15 years. However some are showing decay much sooner," Mr Quinn said.
"We have put in place extra inspections to monitor decay rates and are undertaking a replacement as required."
The two derailments were in February and March and did not cause any serious disruption.
There are about six million sleepers on the KiwiRail network.