Edinburgh, Loanhead and Roslin Railway
The Edinburgh, Loanhead and Roslin Railway was a railway line south of Edinburgh, Scotland, built primarily to serve mineral workings, although passenger trains were operated. It is also known as the Glencorse Branch of the North British Railway. It opened from a junction at Millerhill on the Waverley Route, to Roslin in 1874 and was extended to a location near Penicuik to serve Glencorse Barracks and a colliery in 1877 and to Penicuik Gas Works in 1878. Bus services substantially eroded the passenger carryings on the line, and passenger trains ceased in 1933. There was some revival in colliery activity after World War II but most of the traffic had ceased in 1969 and the line finally closed completely in 1989. History

First proposals
Many Scottish railways were authorised in the frenzy of schemes in Parliament in the 1845 session, including the Caledonian Railway; the North British Railway had been authorised the previous year. Earlier there had been a heated debate about the route a line from central Scotland to England ought to take; it was assumed that only one line could be supported commercially, and many communities, seeing the benefit to towns already on a railway line, were extremely anxious to be on the new main line. In the event the limitation to a single main line was cast aside. During the debate, Peebles had been placed on one of the routes, but that scheme fell out of favour, and in November 1845 a Peebles Railway was proposed, for the 1846 Parliamentary session, connecting Edinburgh and Peebles. It would have run by way of Loanhead, Roslin and Glencorse, running to Penicuik and crossing the North Esk, and on to Peebles. The scheme failed to attract support and was not proceeded with. Peebles got its railway later: the Peebles Railway opened in 1855. It branched from the North British Railway main line to Hawick, which became known as the Waverley Route. That line and the Peebles branch line from it ran well to the east of the North Esk, and although there was a "Penicuik" station it did not properly serve the industrial communities of the earlier proposal. The North British Railway constantly wished to consolidate its dominance of the Lothians area, and to keep the rival Caledonian Railway out, and in 1865 it succeeded in getting authority for several branches, and two roads, in the area, under the North British Railway (Lasswade &c. Branches) Act 1865. However, in the following months there was a major upheaval in the NBR board due to shareholder dissatisfaction, and none of the "Lasswade" railways was built. The Edinburgh Loanhead and Roslin Railway
Mineral extraction developed increasingly in the ground to the north of Penicuik, and this led to a proposed railway serving the district; the Edinburgh Loanhead and Roslin Railway Act authorising the line, obtained the Royal Assent on 20 June 1870. the capital was £54,000. Agreement had been reached with the North British Railway to work the line for thirty years for 45% of gross receipts, and a clause allowed the NBR to purchase the concern within five years of opening. Thomas Bouch was the engineer and the contractor was John Waddell. Unprecedented wet weather delayed the construction of the line. While the work was proceeding, the North British Railway informed the Loanhead and Roslin company that the latter would have to pay for the junction with the NBR line at Millerhill. This became a heated dispute, but eventually agreement was reached, in May 1872: the NBR paid one third of the cost. During this period it was evident that further mineral extraction was developing, and a special meeting of shareholders on 5 February 1872 approved the submission of a Bill to extend the line to Glencorse and Mauricewood. The Shotts Iron Company had promised to send 50,000 to 60,000 tons of ironstone annually on the branch and the Glasgow Iron Company was sinking new pits in the district. The Glencorse Extension Act was passed on 5 August 1872 with capital of £36,000. The Shotts Iron Company pit at Mauricewood was on high ground and was reached from the railway branch by a tramway on an inclined plane. Opening the line
The line opened for mineral traffic as far as the Shotts sidings at Loanhead on 6 November 1873; the Shotts Iron Company was the principal customer; traffic was exchanged at Millerhill Junction. Completion of the line as far as Roslin was expected to be ready by end of May, but there were difficulties completing the bridge over Bilston Glen. It was not until 22 July 1874 that Colonel Rich of the Board of Trade made a formal inspection; there were some qualifications in his report, in particular over the method of working, but sanction was later given by letter, on 1 August 1874, after the Company gave written undertakings about the signalling arrangements, and the section from Loanhead to Roslin may have opened on 23 July 1874. Extending to Glencorse
By this time two other short branches had opened in the area: the Esk Valley Railway had opened in 1867, and the Penicuik Railway followed in 1872. In 1875, the Shotts Iron Company sunk a new shaft at Greenlaw near Glencorse Barracks, and (encouraged by the NBR) the ELRR sought Parliamentary authority to extend the line to serve the mine. This was opposed bitterly by the Penicuik Railway, who saw it as an encroachment. Finally the two companies agreed to pool all traffic south of Auchendinny on the Penicuik line and all traffic south of Roslin on the ELRR. In any case the extension to Glencorse was not proceeded with at once due to the company's capital not being fully subscribed; in 1875 the NBR was persuaded to subscribe £6,000 of the required £36,000. In fact the shortage of capital forced the company to proceed with the amalgamation with the NBR; the Royal Assent for the amalgamation was given on 28 June 1877, taking effect on 1 August 1877. ELRR shareholders got preference 5% shares after the first year; a good bargain as their own railway had only paid 2%. Construction of the extension to Glencorse was heavily delayed due to problems with the embankments. On 16 May 1877 Major General Hutchinson inspected the extension, and criticised the absence of block instruments for signalling trains; there had been no decision by the company on the method of working, and an undertaking was required from the NBR (as intended purchasers of the line) as well as from the Loanhead and Roslin Company. A re-inspection of the line took place on 25 June, and the opening to passenger traffic was then approved on 28 June 1877. The line opened on 2 July 1877, to a "Glencross" station opposite the Glencorse Barracks. The station was later renamed Glencorse. There were five passenger trains daily, with first second and fourth class available. There was a self-acting incline running from Greenlaw Colliery to Glencorse station. The line was soon further extended the short distance to Penicuik Gas Works on 30 June 1878. The Greenlaw colliery tramway was transferred a short distance to the west, bringing the coal from Mauricewood Colliery (a new shaft connected to the Greenlaw workings) to the main line nearer the Gas Works end of the line; this took place some time between 1878 and 1894. Bilston Viaduct
In the late 1880s the mansion house of Drydenbank, near Bilston Glen Viaduct, collapsed, having been undermined by coal working. Investigation disclosed that coal workings were moving towards the railway viaduct, and would certainly disrupt it. Negotiation with the colliery owner resulted in a demand for £152,500. The NBR sought powers to replace the viaduct with an embankment, but this was objected to by landowner, and after arbitration by the Board of Trade found that coal reservation of £25,000 would suffice to protect the viaduct, and the NBR was obliged to accept that. Eventually the NBR replaced the viaduct in 1892. The twentieth century
The first bus service from Roslin to Edinburgh started in 1914, immediately affecting passenger carryings on the line. During World War I Gilmerton station was closed from 1 January 1917, being reopened on 2 June 1919. The railways of Great Britain were "grouped" in 1923 following the Railways Act 1921, and the North British Railway was a constituent of the new London and North Eastern Railway (LNER). In the 1930s competition from local bus services intensified considerably and the railway passenger traffic declined steeply, resulting in the passenger service on the line closing on 1 May 1933. The railways were again reorganised by government on nationalisation in 1948; the area was now part of the Scottish Region of British Railways. A new pit at Bilston Glen opened in 1952 as an extension of the Burghlee Colliery (and of the branch to it), and mineral traffic flows on the branch increased considerably. However Penicuik gasworks closed in 1956, removing the last regular traffic from the extension. At that time, the line was cut back to a point immediately south of Glencorse station, to continue to serve the Barracks, but the line was again shortened to Roslin from 31 August 1959, and only mineral traffic continued on the branch, the ordinary goods facilities at Gilmerton, Roslin and Glencorse being withdrawn. However, as late as the summer of 1960, passenger excursion trains used the line. Bilston Glen Colliery opened in April 1961; at the time this was a modern show-piece for the National Coal Board, and further mineral traffic was brought to the line. Roslin colliery closed in January 1969 and the line was abandoned from the north end of Bilston viaduct southwards. The line closed completely in 1989, except for a headshunt at Millerhill Junction. Topography
The line climbed from Millerhill Junction on a steep gradient of 1 in 55. Bilston Glen was crossed by a viaduct 166 feet long and 150 feet high; wrought iron truss girders were supported on brick piers. The line was opened to passenger trains as far as Roslin in early August 1874, and to Glencross on 2 July 1877; it closed to passenger trains on 1 May 1933. Locations on the line were:

 Millerhill; junction station on the Edinburgh and Hawick Railway;
 Gilmerton; closed except for workmen's trains 1 January 1917; fully reopened 2 June 1919;
 Shotts Sidings (Ramsey Pit);
 Loanhead;
 Shotts sidings (Burghlee Pit);
 Roslin station;
 Glencross; later renamed Glencorse;
 Mauricewood Colliery Sidings;
 Penicuik Gas Works. Notes

References

External links
Glencorse station and line history on Disused Stations
 Line history on RailBrit

Closed railway lines in Scotland
Transport in Edinburgh
Transport in Midlothian
Railway lines in Scotland
Railway lines opened in 1870
Early Scottish railway companies
Standard gauge railways in Scotland
North British Railway
Pre-grouping British railway companies
Railway companies established in 1870
Railway companies disestablished in 1877
British companies disestablished in 1877
British companies established in 1870