Main South Line

The Main South Line, sometimes referred to as part of the South Island Main Trunk Railway, is a railway line that runs north and south from Lyttelton in New Zealand through Christchurch and along the east coast of the South Island to Invercargill via Dunedin. It is one of the most important railway lines in New Zealand and was one of the first to be built, with construction commencing in the 1860s. At Christchurch, it connects with the Main North Line to Picton, the other part of the South Island Main Trunk.

Construction
Construction of the Main South Line falls into two main sections: from Christchurch through southern Canterbury to Otago's major city of Dunedin; and linking the southern centres of Dunedin and Invercargill, improving communication in southern Otago and large parts of Southland. Construction of the first section of the line began in 1865 and the whole line was completed on 22 January 1879.

Christchurch-Dunedin section
The Canterbury provincial government built and opened the first public railway in New Zealand, the Ferrymead Railway, on 1 December 1863. A line south to connect with major South Canterbury centres, northern Otago and Dunedin was desired, and on 24 May 1865 construction of what was then termed the Canterbury Great South Railway began. The Canterbury Provincial Railways were broad gauge,, significantly wider than the gauge that later became New Zealand's uniform gauge. The first section of the line was opened to Rolleston on 13 October 1866. Beyond Rolleston, three routes south were considered:
 * A route well inland to cross major rivers in narrower places.
 * A coastal line through fertile country.
 * A compromise between the two, following the most direct route and crossing major rivers at more reasonable places than the coastal route.

The third option was chosen and the line was built through an at times relatively barren part of the Canterbury Plains towards Rakaia. By the time the line reached Selwyn in October 1867, 35 km from central Christchurch the provincial government was so short of finances that construction was temporarily halted.

In 1870, Julius Vogel announced his "Great Public Works Policy" and placed a high priority on the completion of a line between Christchurch and Dunedin. The act of parliament that established the nation's uniform gauge as granted Canterbury an exemption, permitting it to extend its  gauge line to Rakaia, which was done on 2 June 1873. Soon after this, the provincial government recognised the need to conform with the uniform gauge and the broad gauge was phased out by 6 March 1876.

Construction not only progressed south from the Christchurch end and north from Dunedin, but also from the intermediate ports of Timaru and Oamaru in both directions. Construction was swift through the 1870s, and on 4 February 1876, Christchurch was linked with Timaru. Just under a year later, on 1 February 1877, the line was complete all the way from Christchurch to Oamaru in north Otago.

At the southern end, the Dunedin and Port Chalmers Railway opened on 1 January 1873, the first gauge line in New Zealand. Most of this line became part of the Main South Line, with construction progressing north from a junction at Sawyers Bay, leaving the final two kilometres to become the Port Chalmers Branch. A difficult hillside climb out of Dunedin was encountered, with construction taking a significant length of time. For this reason, the line from Dunedin met that advancing south from Oamaru at Goodwood, midway between Palmerston and Waikouaiti, some 310 kilometres south of Christchurch but only 57 kilometres north of Dunedin. The construction south from Oamaru included the creation of two short branch lines along the way, the Moeraki Branch and the Shag Point Branch. On 7 September 1878 the route from Christchurch to Dunedin was opened in its entirety.

Dunedin-Invercargill section
The railway from Dunedin to Clutha was one of the first railways to be built under Vogel's "Great Public Works Policy". Authorised by the Railways Act 1870 at a cost of £5,000 per mile, the line was the first major line constructed to gauge.

Construction was rapid, and the first 10 km section south from Dunedin to Abbotsford opened on 1 July 1874. On 1 September 1875 the line opened to Balclutha; the major town of the lower Clutha River region and 84 kilometres from Dunedin.

At the Invercargill end, construction was swift. The first 17 km to Woodlands opened on 11 February 1874, but the whole section to Gore was not completed until 30 August 1875 as a hill cutting at Edendale caved in several times. In December 1875 the lines to Winton and Bluff were narrowed from the standard gauge in two days.

Undulating countryside necessitated heavier earthworks to Balclutha, completing the route from Dunedin to Invercargill, and construction was completed on 22 January 1879. An opening function was held at Invercargill. The Commissioner of Railways, Mr Conyer injured himself in a fall at Gore.

As the line from Dunedin to Christchurch had been finished on 7 September 1878, a rail link was opened all the way from Invercargill to Christchurch, thus completing the Main South Line.

Passenger services
For much of New Zealand's railway history, the passenger service from Christchurch to Dunedin was the flagship of the railway. What is regarded as the country's first "express" run on 6 September 1878 was a special train hauled by the new Rogers K class locomotive "Washington". Leaving Christchurch at 6 am the train arrived at Dunedin at 6.40 pm; there was a breakfast with the Governor and other official guests at Oamaru, passengers were left behind at intermediate stops, and the train was assisted by the Double-Fairlie "Josephine" between Oamaru and Seacliff (where the engine was left for fitters as Ben Verdon the "K" driver made "Josephine" do too much of the work).

When trains began to run between Christchurch and Invercargill in a day in November 1904, the main passenger services on the Dunedin-Invercargill section were essentially an extension of the Christchurch-Dunedin trains. When the line was completed in the late 19th century, trains took 11 hours to travel from Christchurch to Dunedin and were usually headed by steam engines of the original J class or the Rogers K class, except on the hilly section south of Oamaru where the T class was used. In 1906, the A class was introduced and maintained an eight-hour schedule, though they soon handed over duties to the superheated AB class of 1915.

The introduction of the J class and JA class in 1939 and 1946 respectively was the final development in steam motive power, and they took just 7 hours 9 minutes to haul the "South Island Limited" express from Christchurch to Dunedin. During their heyday, these steam-hauled expresses were famous for the speeds they attained across the Canterbury Plains along a section of track near Rakaia nicknamed the "racetrack". They were replaced on 1 December 1970 by the Southerner, headed by DJ class diesel-electric locomotives. Steam engines continued to operate Friday and Sunday night expresses, and they were the last steam passenger trains in New Zealand. This makes New Zealand unusual, as steam saw out its final days on quiet, unimportant branch lines in most countries, while the last regular services operated by New Zealand's steam engines were prominent express passenger trains. This was because the trains' carriages were steam heated, so separate steam heating vans with boilers were required. So on 26 October 1971, an express from Christchurch to Invercargill became the last regular service in New Zealand to be hauled by a steam locomotive.

The Southerner ran to an even faster schedule than the "South Island Limited". The journey between Christchurch and Dunedin was initially cut to just 6 hours 14 minutes, and by utilising two DJs north of Oamaru and three south, the schedule was further cut to 5 hours 55 minutes. Part of these gains resulted from the Southerner not carrying mail, while the South Island Limited was slowed down by handling mail.

When many branch lines were open, local passenger services and "mixed trains" of both passengers and freight were a regular sight on the Main South Line as they made their way to their branch destination, but such trains were progressively cancelled during the 20th century and ceased to exist entirely a number of decades ago. An evening railcar service operated in the middle of the 20th century and took 6 hours 10 minutes between Christchurch and Dunedin: it was cancelled in April 1976. The Main South Line was used in Dunedin to provide commuter services both north to Port Chalmers and south to Mosgiel. In the days of steam, AB, B, and BA classes operated suburban trains, though railcars were used on occasion until 1967. In 1968 commuter services were dieselised and operated by the DJ class, or sometimes the DI class and DSC class. The Port Chalmers services lasted 11 more years and were cancelled in late 1979, followed by the Mosgiel services in December 1982. Between 1908 and 1914, the line to Mosgiel was double-tracked because of the commuter traffic, but it has been converted back to single track since the end of commuter services.

On 10 February 2002, the Southerner was withdrawn as it was claimed to no longer be economic to operate. As of January 2020, only two regular passenger services utilise small portions of the Main South Line: between Christchurch and Rolleston by the TranzAlpine before it heads along the Midland Line to Greymouth; and the only passenger trains to use Dunedin Railway Station are those operated by Dunedin Railways, which is as of May 2020 is mothballed.

Freight services
Until the 1960s, there was little focus on long-distance freight between the major centres. Instead, the Main South Line was used to feed its many branch lines, with the majority of goods trains being local services between regional areas and major centres or harbours in Christchurch (Lyttelton), Timaru, Oamaru, Dunedin (Port Chalmers), and Invercargill (Bluff). A good example of how regionalised this traffic was comes from the Dunedin-Invercargill portion of the line. North of Clinton were five branches whose traffic essentially ran to and from Dunedin/Port Chalmers, while south of Clinton were four branches whose traffic essentially ran to or from Invercargill/Bluff. As this short-distance local traffic declined in the 1950s and 1960s and branch lines closed, long-distance freight increased, with through services between the major centres rising to prominence. The concentration of exports on fewer ports and the development of containerisation spurred on long-distance freight, and the first freight train from Christchurch to Invercargill was introduced in December 1970 on a 16-hour schedule.

Today, to meet the demands of modern business and to compete with road transportation, operations continue to be enhanced, and much traffic comes in the form of bulk cargo from large customers. Although passenger services no longer exist, the future of long-distance bulk freight on the line appears secure and the Main South Line is an important link in New Zealand's transport infrastructure.

List of secondary and branch lines
Many secondary and branch lines had junctions with the Main South Line. Below is a list of these lines, all of which are closed unless otherwise noted.
 * Bluff Branch (open for freight)
 * Catlins River Branch (first 4 km open as the Finegand Industrial Siding)
 * Dunback and Makareao Branches
 * Fairlie Branch
 * Fernhill Branch
 * Kaitangata Line
 * Kingston Branch (initial portion open for freight as part of the Wairio Branch)
 * Kurow Branch
 * Methven Branch
 * Midland Line (Rolleston to Greymouth, open for both freight and passengers)
 * Moeraki Branch
 * Mount Somers Branch
 * Ngapara and Tokarahi Branches
 * Ocean Beach Branch
 * Otago Central Railway (first 64 kilometres remain open for passengers: initial four kilometres are an industrial spur and the remaining 60km is owned by Dunedin Railways)
 * Outram Branch
 * Port Chalmers Branch (open for freight)
 * Roxburgh Branch
 * Shag Point Branch
 * Southbridge Branch (initial portion remains for freight as the Hornby Industrial Line)
 * Tapanui Branch
 * Tokanui Branch
 * Waikaka Branch
 * Waimate Branch
 * Waimea Plains Railway
 * Walton Park Branch
 * Wyndham Branch