Railways were initially constructed by provincial governments looking for a mode of efficient transportation.

The old Auckland Railway Station

The first railway in New Zealand was constructed by the Canterbury Provincial Government in 1863. It was built to a broad gauge of 5 feet 3 inches (1600 mm), to suit rolling stock imported from Victoria, Australia. Its primary purpose was to service ships docked at the Ferrymead wharf.

On the 5th of February 1867, the Southland Provincial Government opened a branch railway from Invercargill to Bluff. This railway was built to the international standard gauge of 4 ft 8½ inches (1,435 mm). At this stage, the Central Government set the national gauge at 3 ft 6 in (1,067 mm).

A narrow-gauge line was opened on 1 January 1873, in the Otago Province, and Auckland's first railway, between Auckland and Onehunga, opened in 1873.

After the abolition of provincial governments in 1876, the Central Government took over the building of railways in New Zealand.