In 1990, New Zealand Rail Ltd was incorporated as a limited liability company wholly owned by the Government. In September 1993, following a bidding process, the company was sold to Tranz Rail Holdings. Principal shareholders included Wisconsin Central Transportation Corporation, Berkshire Partners LLC and Fay Richwhite & Company.

New Zealand Rail Ltd became Tranz Rail Ltd in 1995 and the company was listed on the New Zealand stock exchange in 1996.

The change appeared to bring benefits through the early years. Costs were reduced and freight volumes increased. But a recapitalisation, increased debt, and management changes combined to sap profitability and performance in the late 1990s and early 2000s. Growing levels of debt reduced the amount of capital available for investment in the network.

In 2002, the Government negotiated with Tranz Rail to buy back the Auckland suburban network. Auckland local authorities through Auckland Regional Council's transport agency, the Auckland Regional Transport Authority, became responsible for providing suburban rail services through a contracted operator.

In 2002 Tranz Rail sold the Auckland network to the Crown. The following year, the two parties discussed a wider solution that would have involved the Government taking a stake in Tranz Rail. Before any decision was made, Toll Holdings offered to buy Tranz Rail on the basis that it could operate the company at existing levels without Government support.

In 2003 the Government and Toll Holdings reached agreement on the purchase and operation of the network infrastructure. This was vested in the New Zealand Railways Corporation, the body which had held the Crown's interest in the railway land since New Zealand Rail Ltd was created in 1990. ONTRACK became the entity's trading name.

On 1 July 2008 the Government purchased Toll New Zealand's rail and ferry businesses. From 1 October 2008 the New Zealand Railways Corporation became the single entity responsible for both rail and ferry services and rail infrastructure.

For a discussion of the earlier history of rail see:

Neill Atkinson. 'Railways', Te Ara - the Encyclopedia of New Zealand(external link).