Kiwirail says it can guarantee the rail network is safe even though 7000 railway sleepers imported from Peru have rotted and some of them may have been a factor in two derailments.
The sleepers are infected with fungus and are being replaced.
Chief executive Jim Quinn told Morning Report the network has been closed where it is deemed unsafe.
All remaining rotten sleepers will be removed by early next year, at a cost of between $250- $1000 each. Many of them are on bridges or in tunnels.
Some 100,000 sleepers have been imported from Peru in the past decade.
Mr Quinn said Kiwirail is disappointed with the quality of the sleepers - which should withstand fungus infestations - and is still in a legal dispute with the Peru supplier.
Origin of fungi unknown
The Ministry of Primary Industries does not know where the fungi originated.
MPI says the timber imports from Peru all met inspection and fumigation standards.
The ministry says it is not possible to determine whether the fungi originated in New Zealand or was on the sleepers when they came into the country.