1850, on the opening of the main line which ran from Glasgow via Kilmarnock and Dumfries to Carlisle. When local interests promoted a railway branching from it at Dumfries and running to Castle Douglas, the G&SWR actively supported it, in fact subscribing £60,000 towards the little Company's capital. The G&SWR motives appear to have been a desire to secure the territory from their rival, the Caledonian Railway, as well as the formation of a first section of a route to Portpatrick. The Castle Douglas and Dumfries Railway (CD&DR) opened on 7 November 1859 and was worked from the outset by the G&SWR. The larger Company soon made advances to take over the CD&DR, and did so (formally on the basis of an amalgamation) on 1 August 1865. Plans for a railway in Wigtownshire and Kirkcudbright On 30 April 1856, before the CD&DR obtained its authorising Act of Parliament, a meeting was held in Wigtown at which it was agreed that Wigtownshire and Kirkcudbrightshire needed a railway connection, and on 26 May 1856 it was decided to build a railway to Dumfries; the intention included connecting Portpatrick to the national railway network, with a view to reviving the Donaghadee route. The Government indicated tentative support for such a sea connection, and for improving the harbour at Portpatrick, so the Committee proceeded ; on 19 September 1856 plans for the route of the British and Irish Grand Junction Railway were tabled. By now the CD&DR had obtained its authorising Act and the Portpatrick line would join it at Castle Douglas instead of going independently to Dumfries. The route east of Newton Stewart took a markedly northerly course through bleak terrain, and this may have been to avoid competing with coastal steamers on a more southerly alignment. While there was much enthusiasm locally for the new venture, it was important to obtain financial support from investors elsewhere. For a while the Great Northern Railway (GNR) was leading, offering £160,000. At the time the GNR was no closer than Bradford, but it sought alliances and for a time had hopes of forming its own trunk route to Scotland and the north of Ireland. This was ended when the G&SWR made it clear it would refuse running powers between Gretna Junction and Castle Douglas. The Portpatrick Railway: formation and construction The Bill for the new line went to Parliament in the 1857 session, but the