The Australian state of New South Wales has an extensive network of railways, which were integral to the growth and development of the state. The vast majority of railway lines were government built and operated, but there were also several private railways, some of which operate to this day.
During the 20th century the railways have always been run by a state-owned entity, which has undergone a number of different minor name changes, including New South Wales Railways and New South Wales Government Railways. The current entity responsible for running the New South Wales railways is Rail Corporation New South Wales which includes CityRail and CountryLink. It also ran freight services until 2001, when this business was taken over by Pacific National. Since 2003, the NSW interstate and Hunter Valley rail corridors, and the dedicated metropolitan freight lines to the Sydney ports have been under the control of the Australian Rail Track Corporation, and it also maintains other rural branch lines under contract to Rail Corporation New South Wales.
New South Wales' railways date from 1854, when the first line was built from Sydney to Parramatta Junction. After two decisions to change the rail gauge, problems in raising capital and difficulties in construction, the line was opened in 1854, and lines have been built to standard gauge ever since. The Main Southern line was built in stages from Parramatta Junction to the Victorian border at Albury between 1855 and 1881 and connected to the Victorian Railways at a break-of-gauge in 1883. The standard gauge connection from Albury to Melbourne was finally opened in 1962, completing the Sydney-Melbourne railway. Lines were built to connect the ports of Sydney and Newcastle to the rural interior, and the Main Western line was built from Parramatta Junction line to the north west of the state, reaching Bourke between 1860 and 1885. The Main North line was built from Newcastle to Wallangarra on the Queensland border and connecting with Queensland Railway's line to Brisbane at a break of gauge between 1857 and 1888. Sydney and Newcastle was finally connected in 1889. Construction of the shorter and single-gauge North Coast railway line between Sydney and Brisbane commenced in 1905 and was completed with the opening of the Grafton Bridge in 1932. The last main line was completed to Broken Hill in 1927, connecting with the South Australian Railways at a break of gauge. In 1969, the South Australian section was standardised, completing the Sydney–Perth standard gauge link. Meanwhile branch lines proliferated over the settled east of the state, including the Illawarra line to Wollongong and Nowra completed in 1893. In 1926 work began on electrifying Sydney's urban railways and connecting them together via new lines.
The first company to start rail transport in New South Wales was the Sydney Railway Company which was incorporated on 10 October 1849 with the aim of building a railway from Sydney to Parramatta. Capital was raised, shares were sold, and a route was surveyed. The first sod was turned by Mrs Keith Stewart (daughter of the Governor) at Cleveland Paddocks (an area between the southern end of the current Sydney station and Cleveland Street) on 3 July 1850.
The original engineer appointed was Francis Webb Shields, an Irishman. He persuaded the New South Wales legislature to pass an Act on 27 July 1852 requiring all railways in the colony to be of 5 ft 3 in (1,600 mm) gauge. This was the gauge in use in Ireland and is now referred to as 1600 mm gauge. After Shields resigned because of the difficulties, a Scot named James Wallace was appointed. Wallace persuaded the legislature to repeal the previous act and replace it, on 4 August 1853, with one requiring a gauge of 4 ft 81⁄2 in (1,435 mm) - the current standard gauge of 1435 mm. (Unfortunately for Australia, the legislation requiring the broad gauge had been noted in the colonies of Victoria and South Australia and some rolling-stock ordered.)
The Sydney Railway Company encountered many troubles: engineers came and went; real estate required became expensive and difficult to acquire; money, supplies and manpower ran short, partly because of a gold rush. Eventually the property of the Sydney Railway Company was transferred to the government of New South Wales on 3 September 1855.
The line opened on 26 September 1855, from Sydney to Parramatta Junction (near Granville Station), with stations at Newtown, Ashfield, Burwood and Homebush. The Sydney terminal station was on the south side of Devonshire Street, just south of the current Central Station. Although the vicinity was sometimes referred to as Redfern, it was not near the current Redfern station. This line is still the core line of the Sydney suburban rail system.
Sydney's suburban rail network further developed from main line railways constructed in the 19th century, together with branches built in the late 19th and early 20th century. The existing network was electrified from 1926 at 1500 V DC under the Bradfield plan (in the 1920s and 1930s) and later modifications to his plan. In 1932, the Sydney Harbour Bridge was completed and the key inner city line from Central to Town Hall, Wynyard, Milsons Point and North Sydney was opened. In 1956, the Circular Quay station opened, completing the City Circle. The underground Eastern Suburbs railway was completed to Bondi Junction in 1979. Most recently, in 2000, the line to Sydney Airport and Wolli Creek was opened, with the most recent addition to the network being the Epping to Chatswood Rail Link, opened in 2009.
A branch line was built from Clyde to Camellia in 1888 and extended to Carlingford in 1896 by private companies. The line were bankrupt in 1896 and the Government purchased and reopened it in 1900. This line is now part of CityRail's Carlingford line.
Another branch was built from Lidcombe to Regents Park in 1912 and extended to join the Main Southern Line at Cabramatta in 1924, creating an alternative route to Liverpool. This is now part of CityRail's Inner West line.
An extension of the line from Parramatta Junction to Liverpool was opened on the first anniversary of the Sydney-Parramatta line - 26 September 1856. It was extended to Campbelltown in 1858, Picton in 1863, Mittagong in 1867, Marulan in 1868, Goulburn in 1869, Yass Junction in 1876, Galong, Harden- Murrumburrah and Cootamundra in 1877, Junee in 1878, Wagga Wagga in 1879, Uranquinty, The Rock and Henty in 1880 and Albury in 1881. Victorian Railways broad gauge line from Wodonga was extended to Albury station in 1883. The standard gauge connection from Albury to Melbourne was finally completed in 1962. A branch line was opened from Goulburn to Queanbeyan (1885) and Cooma (1887) and an 8 km line from Queanbeyan completed the connection to Canberra in 1914.
The Main Western Line was extended from Granville to the current Parramatta station and Blacktown in 1860 and Penrith in 1863. It was built over the difficult topography of the Blue Mountains by using zig zag railways at Lapstone (opened in 1867) and Lithgow (opened in 1869). Both of these sections were replaced by deviations, using tunnels by 1910. The line was extended to Bathurst (1876), Orange (1877), Dubbo (1881), and Bourke (1885).
A section of the current main line from Sydney to Perth and Adelaide, was built from Orange to Molong (1885), Parkes (1893), Condobolin (1898) and Trida (1919). A separate section of standard gauge line was also opened from Menindee to Broken Hill in 1919, which met the 1067 mm gauge Silverton Tramway at a break-of-gauge opened in 1888. At Cockburn, South Australia, the Silverton Tramway connected with the South Australian Railways system to Port Pirie and via a break of gauge at Terowie to Adelaide. The final missing link between Trida and Broken Hill was completed in 1927. In 1969 the Broken Hill - Port Pirie was standardised, completing the Sydney - Perth standard gauge link.
The Illawarra Line was opened in stages progressively southward from Sydney starting in 1884 and reaching Wollongong in 1884 and Bomaderry, near Nowra in 1893. A branch line was built from Sydenham to Belmore in 1895, Bankstown in 1909 and Regent Park in 1928, which became part of the Bankstown Line of the CityRail network.
The first section of the Main North line was built in the Hunter Valley by the New South Wales Government Railways in 1857. It was extended north to Wallangarra in various stages, reaching the Queensland border and connecting with Queensland Railway's line to Brisbane at a break-of-gauge in 1888. The final section between Strathfield and Newcastle was completed by the opening of the Hawkesbury River bridge in 1889.
The North Coast railway line was built between 1905 and 1932, and when completed, bypassed the Main North Line and provided a quicker route up the eastern seaboard. The first part of the North Coast line was built between Casino and Grafton in 1905, as an extension of a line from Murwillumbah. It was extended from Casino to Kyogle in 1910 and Brisbane in 1930. The section from Maitland junction to South Grafton was opened progressively between 1911 and 1915. The Clarence River at Grafton was the most difficult river to cross, and was the last section to be opened in 1932, upon completion of the Grafton Bridge.
A number of private lines were built to connect the South Maitland coalfields (discovered in 1886) with the Great Northern Railway at East Greta Junction near Maitland. By 1918 most of these had been merged into the South Maitland Railway.
A narrow gauge railway was built by South Australian Railways from Port Pirie, South Australia to Broken Hill, in 1888 to serve its silver and lead mine, which was becoming the largest and richest of its kind in the world. Since the New South Wales Government would not allow the South Australia Railways to cross the border, the last 30 km was built by a private company as a tramway, the Silverton Tramway from Cockburn, South Australia to Silverton, New South Wales and Broken Hill. In 1970 the line was replaced by a standard gauge South Australia government line, completing the standard transcontinental gauge line from Sydney to Perth.
A number of other private railways have been built in New South Wales to serve coal mines, steel works (notably the Port Kembla steel works, formerly operated by BHP (now BlueScope Steel) and quarries, especially in the first half of the 20th century.
Because parts of New South Wales are closer to adjacent states than the state owned railway, foreign lines of different gauges have extended short distances into New South Wales.
The Deniliquin-Moama line was the first 5' 3" gauge line to be extended into the state. Permission was granted to the Deniliquin and Moama Railway Company by the New South Wales Government in 1874 to construct a line 45 miles (72 km) long line from Moama to Deniliquin, connecting with the Victorian Railway system at the Murray Bridge, near Echuca and the line was opened in 1876. This was followed in 1906 when an agreement was made between both states for the Victorian Railways Goulburn Valley line to be extended north into Tocumwal. Opened in 1908, both states shared construction costs for the line but the profit (or loss) would be Victoria's.
The final stage was in 1917 when the Border Railway Commission (made up be representatives of both states) recommended favourably on the construction of four additional Victorian lines into New South Wales, culminating in the 1922 Border Railways Acts of both states. The Deniliquin and Moama Railway Company was taken in 1923 at a cost of £165,000. New construction included the Balranald, Oaklands, Stony Crossing, and Lette lines. Only the first two remain open today.