The route between Ayr and Kilmarnock comprises of six stations – Ayr, Newton-on-Ayr, Prestwick Town, Prestwick International Airport, Troon, Kilmarnock.
Railways in this area were originally developed for coal and other minerals. In 1812, the horse-operated Kilmarnock & Troon Railway opened. The line was constructed to carry coal from Kilmarnock to the harbour at Troon and was the first railway in Scotland to be authorised by an Act of Parliament.
The Glasgow, Paisley,Kilmarnock & Ayr Railway (GPK&A) opened in 1839 to provide train services between Glasgow, Kilmarnock and Ayr. The section between Glasgow and Paisley was developed jointly with the Glasgow, Paisley and Greenock Railway.Later, a line was built from Dalry via Kilmarnock to Cumnock where it linked with the Glasgow, Dumfries and Carlisle Railway that formed a through route from Glasgow to Carlisle.
In October 1850, the two companies merged to become the Glasgow & South Western Railway.