A report done by KiwiRail shows it considered stopping its entire freight business.
This was one of four options put forward by KiwiRail in a report to its three shareholding ministers.
A second option was to split the company into North Island and South Island stand-alone entities, which would involve the loss of the Cook Strait ferry service from the company's books.
The others were to confine freight operations to the Auckland-Hamilton-Tauranga triangle, or maintain a slimmed down national network.
None of the four options covered Auckland and Wellington metro passenger services.
The report was completed in 2014 and was done so that ministers understood the options the company faced on a purely economic basis.
The social and environmental benefits of rail were not included under principles requiring state owned enterprises to operate commercially.
'Business as usual' was also excluded from the process since the company depends on state assistance for its infrastructure.
The report was kept under wraps even after the no-freight option was effectively torpedoed by the Minister of Finance Bill English in the 2015 budget.
But a redacted version of the report has been released this morning.
In it, the report said the effective shutdown of the service gave the greatest value to the government as shareholder.
Restricting services to the upper North Island also had financial advantages.
But separate operations in each island and a slimmed down national network would be costly to the government.
The study was led by KiwiRail's board of directors and carried out by company staff with help from consultants, Treasury and the Ministry of Transport.
The intention to carry out the review was discussed with government ministers and stemmed from a desire for long term planning instead of annual budget decisions.
KiwiRail chief executive Peter Reidy said the aim was to look at the future of the company for as long as 20 or 30 years.
That time frame made sense since trains often lasted for 50 or 60 years and the rail infrastructure for as long as a century, he said.
And he added a report like this needed to be done, even though one of the options being considered would have effectively ended the company itself.
"As an SOE our job is to look at all the commercial imperatives and to look at all the scenarios," he said.
"Our job is not to look at the public benefit that heavy rail brings in terms of growth of exports and tourism or reducing congestion on roads.
"This analysis was purely commercial, that is the brief we work under. It is up to others to look at all the benefits that rail brings to New Zealand."
In the end the government vetoed all four options but said it expected the company to rely less on state aid.
However, it agreed to pay a state subsidy for two years which suited KiwiRail's desire for better long term planning.
KiwiRail makes an operational profit but needs state money to pay for track, land, bridges and tunnels.
That currently works out at around $200 million a year but Mr Reidy said that should slip to around $160 million a year after improvements in efficiency were achieved.
Minister for State Owned Enterprises Todd McClay said he did not expect expect any significant change in KiwiRail's structure but wanted it to be more efficient and as commercially successful as possible.
Mr McClay told Morning Report no decisions about the rail company's future had been made, but the government had to look for ways to take greater burden off the taxpayer.
"At the moment we look at investment in rail separate to investment in roading.
"I think it's very important that the next step of evolution as far as what KiwiRail are doing is that they work much more closely with NZTA [NZ Transport Agency]... there could be some decisions where investments should be put in rail as opposed to roading - or vice versa."
"If there are ways to be more efficient and KiwiRail can focus on important parts of their business, and New Zealand Transport Agency can work out the best balance with them for freight transportation in different parts of the country, it's certainly worth investigating - but no decisions [have been] made yet."
The Rail and Maritime Union general secretary Wayne Butson said the rail company needed significantly more funding to upgrade its network, but ultimately its state-owned model is flawed.
He said KiwiRail should have a complete structural overhaul, or it would wither and die.
Labour Party state owned enterprises spokesperson David Parker said some of the $10 billion that goes to roading every four years through the Land Transport Fund should be paid to rail so the network can be kept going.