The route between Kilmarnock and Dumfries comprises of six stations – Kilmarnock, Auchinleck, New Cumnock, Kirkconnel, Sanquhar and Dumfries.
When it came to link the Glasgow to Carlisle line with the English railway network, the Annandale Line (now th West Coast Main Line) was the preferred option. However, in March 1844 a provisional committee of the Glasgow & Carlisle Railway Company (GD&CR) was formed to promote the interests of Dumfries which was bypassed by the then proposed Annandale route.
The proposal went to Parliament as a Bill in the 1845 session as did the Annandale scheme. Since locomotive power had improved, the gradients over Annandale were less significant and this route could fork as it reached northwards and serve Edinburgh as well as Glasgow
However, Parliament was unwilling to sanction two major lines and on 31 July 1845, the Annandale route was successful in gaining Royal Assent. The supporters of the Nithsdale plan did not give up and resolved to try again in the 1846 session and on 13 August 1846, the Glasgow Dumfries & Carlisle Railway – via Kilmarnock – was authorised.
The GD&CR proceeded with construction contracts and on 21 August 1848 a special train for directors and their friends ran from Dumfries to Annan. The line opened to the public from Dumfries to Gretna on 23 August 1848.
In October 1849, the line was opened from Dumfries to Closeburn and on 20 May 1850, the final section was opened from Closeburn to Horsecleugh where a junction was made with the Glasgow, Paisley, Kilmarnock & Ayr Railway (GPK&AR) which opened Auchinleck junction on the same day.
The Acts of Parliament of 1846 and 1847 confirmed that the GD&CR would merge with the GPK&AR on completion of the GD&CR line and the name was changed to the Glasgow & South Western Railway.
Passenger services on this line are currently operated by Abellio ScotRail.