The Glasgow and South Western Railway (G&SWR) was the third biggest of the five major Scottish railway companies prior to the 1923 Grouping. It served a triangular area of south-west Scotland between Glasgow, Stranraer and Carlisle. It was formed on 28 October 1850 by the merger of two earlier railways, the Glasgow, Paisley, Kilmarnock and Ayr Railway and the Glasgow, Dumfries and Carlisle Railway. Already established in Ayrshire, it consolidated its position there and extended southwards, eventually reaching Stranraer. Its main business was mineral traffic, especially coal, and passengers, but its more southerly territory was very thinly populated and local traffic, passenger and goods, was limited, while operationally parts of its network were difficult.

It later formed an alliance with the English Midland Railway and ran express passenger trains from Glasgow to London with that company, in competition with the Caledonian Railway and its English partner, the London and North Western Railway, who had an easier route. In 1923 the G&SWR formed a constituent of the London Midland and Scottish Railway group.

Much of the network remains active at the present day; Glasgow commuting particularly has developed, and parts of the network have been electrified. Many of the earlier mineral workings, and branches constructed to serve them, have ceased, and many local passenger stations in rural areas have closed.

In 1921 the G&SWR had of line (calculated as single track extent plus sidings) and the company’s capital was about £19 million.

History Before the G&SWR In the early 1830s, there were already several mineral railways operating in Scotland; local in extent, they were mostly built to serve coal mines and other mineral activity. The successful operation of the Liverpool and Manchester Railway as an inter-city line, and then the Grand Junction Railway reaching northwards, caused railway promoters in the west of Scotland to consider that one day, there might be a through railway line to London.

The Glasgow, Paisley, Kilmarnock and Ayr Railway (GPK&AR) was authorised by the Glasgow, Paisley, Kilmarnock and Ayr Railway Act 1837 (7 Will. 4 & 1 Vict. c. cxvii), and opened its line to Ayr in 1840. It was a locomotive railway, and in due time it opened its branch line from Dalry to Kilmarnock, with the intention of extending to Carlisle to meet up with whatever railway might reach that city from the south. The had anticipated constructing its authorised line and then the extension, but by 1846 there was a frenzy of competing schemes that threatened to destroy the company's core business. Few of these were realistic, but the itself felt obliged to promote numerous branches, many of them tactical, in order to keep competing schemes out. This period of railway promotion was followed by a slump, when money was difficult to come by, and these factors prevented the from bringing its Carlisle extension into reality.

Enthusiasm for a connection to English railways continued, however, and was intensified by the promotion of other schemes to link central Scotland and England. Interests friendly to the formed the Glasgow, Dumfries and Carlisle Railway (GD&CR) to extend from the southern extremity of the to Carlisle; their route became known as the Nithsdale Route. Opposing promoters put forward a so-called central line via Carstairs and Beattock, that had the advantage of a shorter mileage, and the capacity to serve Edinburgh directly, but the disadvantage of much heavier gradients and running through a less populous area. This route became known as the Annandale Route.

The was authorised by an act of Parliament, the Glasgow, Dumfries, and Carlisle Railway Act 1846 (9 & 10 Vict. c. ccclxxii), but the rival Caledonian Railway (CR) had already had authorisation for building its line on the Annandale route; the 's financial position led it to abandon its intention of building an independent line to Carlisle, and it altered its plan so as to join the at Gretna Junction, relying on negotiating running powers for its trains to reach Carlisle.

The and the formed the definite intention of merging; at first the demanded terms that were excessive, particularly as their own financial situation was weak: they were funding construction of their line with money loaned by the . However more realistic expectations emerged later, and by the Glasgow, Dumfries, and Carlisle Railway Act 1846 (9 & 10 Vict. c. ccclxxii) and the (10 & 11 Vict. c. clxxxiii) it was determined that the two companies would merge when the had completed construction of its line. The extended as far as Horsecleugh (between Cumnock and New Cumnock) and the reached an end-on junction there, completing the through line on 28 October 1850.David Ross, The Glasgow and South Western Railway: A History, Stenlake Publishing Limited, Catrine, 2104,

The G&SWR formed

Accordingly on 28 October 1850 the was formed.Stephenson Locomotive Society, The Glasgow and South Western Railway, 1850 - 1923, 1950 Although this was described as a merger, the reality was that the penniless was dissolved, its operation was taken over by the , and the latter company changed its name to the . The had been working the 's line for it since it (partially) opened.

The new company had lines: from Bridge Street in Glasgow to Ayr; the Ayr station was north of the river, at Newton-on-Ayr), and the section between Bridge Street and Paisley was owned and operated jointly with the Glasgow, Paisley and Greenock Railway; and from Dalry Junction to Gretna Junction via Kilmarnock and Dumfries; and a number of lines in mineral districts, including the former Kilmarnock and Troon Railway, now upgraded to contemporary technical standards.

The trains on the Dumfries line now ran through to Carlisle, an arrangement having been made with the Caledonian Railway (CR) to permit this. However the did not encourage the and only on 1 March 1851 was a booking clerk given accommodation at Carlisle Citadel passenger station. This was granted on an undertaking that the would never interfere with the business of the or the Lancaster and Carlisle Railway, and tolls were charged for use of the line from Gretna, and for bulk goods passing through Carlisle, whether transshipped or not. The ensured that all traffic between south of Carlisle and Glasgow or Edinburgh was routed over its own line.

The accounts for the first half-year, produced in March 1851, showed gross income for the six months to be £87,186 and a 2.25% dividend was declared. The company owned 72 engines, 171 passenger coaches, and 2,416 non-passenger vehicles. Good enough as the results were, the long main line to Gretna was not producing much, due to the dominance of competing route of the Caledonian Railway, and business in general declined following the first half-year. A pooling agreement was finalised in 1853 which mitigated some of the worst toll charges, but routing of goods traffic via the was made obligatory in many situations. The agreement included a comprehensive limitation on encroachment by either railway into the other's territory.Campbell Highet, The Glasgow & South-Western Railway, Oakwood Press, Lingfield, 1965

Expansion by alliance

In the years immediately following the formation of the G&SWR, the shortage of capital meant that no definite steps were taken for further expansion. Local initiatives were encouraged, however, with the G&SWR providing some funding and in most cases working the line when it was completed.

The Ayr and Dalmellington Railway Act 1853 (16 & 17 Vict. c. cxlviii) was passed on 4 August 1853. At this time the G&SWR Ayr station was north of the River Ayr, and the A&DR was to run from Falkland Junction, a short distance north of the station, and round the east side of the town. The new line had an Ayr passenger station (a temporary structure at first), but it was less convenient than the old terminus; until January 1860 the old G&SWR terminus station continued to be used by some trains. There were important ironworks owned by the Houldsworth family, and ironstone and coal deposits, in the lands near Dalmellington. The independent A&DR company was worked by the G&SWR and later absorbed on 1 August 1858.

On 10 July 1854 the Ayr and Maybole Junction Railway was authorised to reach Maybole by a junction from the Ayr and Dalmellington; the junction was to be called Maybole Junction, but was named Dalrymple Junction when the line opened to goods traffic on 15 May 1856. Passenger opening was delayed until 2 August 1856 because of the Board of Trade inspecting officer's dissatisfaction with the works at first. This line too was worked by the G&SWR.

There were discussions of a further extension railway to reach Girvan and develop the harbour there, possibly as a ferry port for Ireland: a Maybole and Girvan Railway was formed in 1855; it got its authorising act of Parliament, the Maybole and Girvan Railway Act 1856 (19 & 20 Vict. c. xcix), on 14 July 1856. All of these local initiatives received the promise of cash support from the G&SWR. The Maybole and Girvan line opened on 24 May 1860; the old Maybole station, east of Redbrae, was unsuitable for an onward route and was by-passed, the new passenger station being at Culzean Road.

The Ardrossan Railway had long been allied to the G&SWR and by the Ardrossan Railway Transfer Act 1854 (17 & 18 Vict. c. clxxxii) of 24 July 1854 it was vested in the G&SWR, effective on 1 August 1854. The line ran between Ardrossan Harbour and Kilwinning, with mineral branches extending further east.

Reaching towards the north of Ireland

The wide space of countryside west of Dumfries and south of Girvan still lacked any rail connection. In 1856 a provisional Castle Douglas and Dumfries Railway (CD&DR) was gaining momentum. It was independently sponsored, although it was seen as a possible first step in opening up the entire region; it was authorised on 21 July 1856. This prompted the G&SWR to relocate the Dumfries station to a point north of St Mary's street; the former "temporary" station was relegated to goods status. The new station opened on 13 September 1859: it was described as "equal if not superior in lightness and beauty to any in Great Britain".Glasgow Herald (newspaper), 27 September 1859, quoted in Ross The line opened on 21 July 1856.The SLS says 7 November.

For many years schemes had been put forward to reach Portpatrick. There was a small harbour there and ferry crossings to Donaghadee provided the shortest route to reach the north of Ireland. Mail, cattle, and soldiers had been conveyed that way, but reaching Portpatrick with a railway across difficult and sparsely populated land had been a challenge. Encouraged by the authorisation, at the end of 1856 promoters resolved to build a British and Irish Grand Junction Railway, from Castle Douglas. Government assurances were given about the use of the sea route for mail and improvement of the tiny harbour at Portpatrick, and suddenly rival railways including the English Great Northern Railway were hastening to put up money for a share. With a capital of £460,000, the line looked well supported and got its act of Parliament, the Portpatrick Railway Act 1857 (20 & 21 Vict. c. cxlix), on 17 August 1857, retitled the Portpatrick Railway.C E J Fryer, The Portpatrick and Wigtownshire Railways, The Oakwood Press, Headington, 1991,