In the early 1870s construction began on the Port Chalmers Branch railway line linking Dunedin and Port Chalmers. Originally the contractors intended for the tracks to pass down George Street to the port, but following objections from the Town Board it was conveyed via a cutting and a tunnel to emerge on Beach Street before terminating on a new wharf. Soil excavated from the tunnel was used for the reclamation of land for the new wharf on which the railway line terminated. When the railway line opened on 1 January 1873 it was the first 1,067 mm narrow gauge railway in New Zealand. The opening of this line bought to an end the lightering service between Port Chalmers and Dunedin. The branch line was subsequently incorporated into the national rail network through a connection at Sawyers Bay to the Main South Line, which was opened through to Christchurch on 7 September 1878 and Invercargill on 22 January 1879. As the Main South Line passed along the hillside above Port Chalmers a railway station locally called the “Upper Station” was built to service passengers. The terminus of the branch line on the wharf continued to service freight and was known as the “Lower Station”.