The Stirling and Dunfermline Railway (S&DR) was a railway in Scotland connecting Stirling and Dunfermline. It was planned by the Edinburgh and Glasgow Railway to get access to the mineral deposits on the line of route, but also as a tactical measure to keep the rival Caledonian Railway out of Fife.

There were serious difficulties at the time of opening about a commitment to lease the railway, but it finally opened throughout in 1852. There was a branch to Tillicoultry, and the Devon Valley Railway built a line from there to Kinross.

A predecessor line, the Alloa Waggonway, had been developed as a horse-operated waggonway in the eighteenth century, bringing coal from the hinterland to Alloa and Clackmannan harbours; in its day the line was technologically advanced, but it was eclipsed by the modern Stirling and Dunfermline line.

The Alva Railway built a short branch line from Cambus, on the Stirling and Dunfermline line, opening in 1863.

Finally the Caledonian Railway built a viaduct over the Forth at Alloa, and the Caledonian and the North British Railway (which had taken over the Stirling and Dunfermline Railway) collaborated in operating the new short cut; much passenger and goods traffic ran over the bridge; the route was shared, with each company having running powers over the other's line.

All these lines closed in the period following 1950 when rail travel was waning, but the section between Stirling and Alloa has reopened in 2008, and carries a regular passenger service.

History Before railways Dunfermline and Stirling had long been centres of commerce, and of regional government, and of industry. Intermediately, the town of Alloa, also situated close to the Forth, was an important industrial centre, known for brewing, glass manufacture, woollen goods, and collieries.

On the north side of the tract of land following the Forth the Ochil Hills present a natural barrier to northwards travel, being closest at the Stirling end.

The Alloa Railway

The Earls of Mar owned extensive lands in the hinterland of Alloa, and for some centuries coal had been produced from pits on the estate. An extensive system of waggonways, initially wooden railed, later wood with iron facings, was installed from about 1768 to move the coal, using horsepower and gravity, from the pits downhill to the Forth.

A frenzy of railway authorisation In 1842 the Edinburgh and Glasgow Railway (E&GR) opened its main line, and intercity railway travel was possible in Scotland. The line was immediately profitable, and showed that an inter-city railway could be a commercial success. The English railway network was growing in density and thoughts now turned, not merely towards connecting to the English system, but to the formation of a Scottish network too.

The easy availability of money resulted in a very considerable number of Scottish lines being proposed in the following years, and in the 1845 parliamentary session many were authorised. Among them were the Edinburgh, Perth and Dundee Railway, planned to cross Fife from a ferry pier at Burntisland to Perth, and to a ferry pier on the Tay opposite Broughty Ferry. Also authorised was the North British Railway (to build from Edinburgh to Berwick, and the Scottish Central Railway, to build from the Edinburgh and Glasgow line near Castlecary to Perth, and the Caledonian Railway, to build from Glasgow and Edinburgh to Carlisle.

The fragmented nature of these authorisations resulted in an immediate search for alliances, and even before much construction had taken place, some companies' boards thought it essential to seek to control as much territory as possible, by friendly alliance or by takeover. Many of these alliances were quickly agreed, and in many cases without much strategic thought.

Authorisation of the S&DR

The Edinburgh, Perth and Dundee Railway (successor to the Edinburgh and Northern Railway) was authorised to make a branch from Thornton (near present-day Glenrothes) to Dunfermline. Dunfermline was an ancient seat of government and industry, but it was the minerals, especially coal, in the area which encouraged the building of a line. The Edinburgh and Glasgow Railway too saw that potential, and promoted a nominally independent company, the Stirling and Dunfermline Railway, which would capture the Alloa coalfield and develop other mineral locations at Dunfermline and elsewhere on the line of route

The Edinburgh and Glasgow Railway sought to expand northwards and formed an alliance with the Scottish Central Railway (SCR), and submitted a parliamentary bill for the 1846 session for a Stirling and Dunfermline Railway. As well as opening up a considerable area of agricultural land, the line would give the access to areas of mineral extraction along the line of route, and beyond Dunfermline as well. Coal was the dominant mineral, but some blackband ironstone was being extracted and limestone was being fired on the northern shore of the Forth. A special meeting of shareholders was held on 12 May 1846 to give approval to the merger and the promotion of the Stirling and Dunfermline line.Falkirk Herald and Stirlingshire Monthly Advertiser, 14 May 1846 A 35-year lease contract had been agreed, paying 4% rent on the construction cost of the S&D after 35% of receipts for operating expenses.Dundee, Perth, and Cupar Advertiser: Friday 12 September 1845

The (9 & 10 Vict. c. ccii) received royal assent on 16 July 1846. As well as the main line between the places in the name, branches were authorised to Tillicoultry and to Alloa Harbour. The authorised capital for over 24 miles of railway was £390,000. In 1847 and again in the (11 & 12 Vict. c. cxxvii) a number of diversions of the route, and of local tramways, were authorised.

The planned merger of the and the "on equal terms" would give the the necessary access to Stirling; however during 1847 the Scottish Central reconsidered its alliance, and it decided that the Caledonian Railway, with which it was to connect near Castlecary, would be a better partner, and it rejected the intended link with the . Suddenly the found that it had no railway link to the , and the found itself isolated.

Opening

A line from Dunfermline to Charlestown Harbour was already in existence, and the line was constructed from east to west, taking advantage of the facility. The first section, from Dunfermline to Oakley, opened on 13 December 1849. There were ironstone and coal deposits at Oakley, and in 1845 the Forth Iron Works started construction of its plant there. It began production the following year.Extract from Mining District Report, 1847, on Scottish Mining Website http://www.scottishmining.co.uk/107.htmlDescription of Carnock Parish in 1862; edited extract from Westwood's Directory for the Counties of Fife & Kinross, published 1862, on Genuki website at http://www.genuki.org.uk/big/sct/FIF/parishes/Carnock/

The line was extended to Alloa on 28 August 1850. On 3 June 1851 a branch to Alloa Harbour, authorised by the (12 & 13 Vict. c. lxxxvi), already connected to the Alloa Railway, was opened, together with the Tillicoultry branch. In addition a passenger station was opened at the harbour; it was named Alloa Ferry, opening the same day. There was a long established ferry service crossing the Forth at this point, and the Scottish Central Railway had opened a branch from its main line to South Alloa, meeting the ferry on the south side, on 12 September 1850.

The Tillicoultry branch had been delayed because of difficulties in constructing a bridge over the River Devon at Glenfoot. Although the final section to Stirling was relatively short, the opening of that part of the line was much delayed by a dispute. The Stirling and Dunfermline Railway Company had never intended to operate the line itself, and had contracted with its sponsor, the Edinburgh and Glasgow Railway, that the latter would lease the line and operate it on its completion. Since that time the had failed to acquire the Scottish Central Railway, which lay between the two lines, and the had become hostile. The had other priorities and now saw that operating a remote section of line would be a considerable liability, and it declined to do so.

The Edinburgh and Glasgow Railway had undertaken to lease and work the line on the assumption of merging with the Scottish Central Railway, but this arrangement had fallen through. As the day of opening of the approached, it became obvious that the intended to evade its obligations to lease and work the line. On 6 April 1849 the Engineer Miller issued a certificate that the line was complete (to Oakley) but the declined to lease it as had been agreed.Caledonian Mercury, 1 October 1849 Faced with legal action to force compliance, the used the letter of the contract it had made with the , insisting on completion of the as authorised, and declining to accept any deviation at Stirling to accommodate a connection with the . (The was prepared to accept the crossing the Forth at Stirling on its bridge there, and using their station, but the insisted on separate facilities being provided. Nonetheless "Dunfermline Line Junction" at Stirling was a recognised location south of Stirling station into the 1970s.)

The had not the resources to operate the line itself and applied for legal sanction to oblige the to comply with its obligation, and the used every device to avoid compliance. In particular in demanded that the build an independent line crossing the Forth at Stirling, and station facilities there (in accordance with the original act of Parliament), even though the had indicated that it was prepared to allow the to use its bridge and terminal. Eventually on 1 July 1852 the line was opened throughout to Stirling. The passenger service at Alloa Ferry was closed on the same day, having been little used. A connection between the and the lines was soon made south of the river at Stirling and the unnecessary terminal station fell into disuse.

Even now the refused to operate the line, and the had to acquire three locomotives and the rolling stock to do so itself. states that the Edinburgh and Northern Railway and the together worked the line; it is likely that this is correct, but that they made their willingness conditional on the actually procuring the locomotives.

Nonetheless the railway was open, and a normal train service was in operation.

Company takeovers

The Stirling and Dunfermline Railway Company was vested in the Edinburgh and Glasgow Railway (E&GR) by the (21 & 22 Vict. c. lxiv) of 28 July 1858. The was already a significant player: it opened its main line in 1842. Having started as an inter-city line the had been collaborating with the Monkland Railways and others in handling coal and iron in the west of Scotland, which became a dominant traffic. Now it had access to Dunfermline, and the west Fife coalfield. The itself was taken over by the North British Railway (NBR) on 1 August 1865.

The Scottish Central Railway was absorbed by the Caledonian Railway in 1865.

The Alva Railway

Alva was a significant manufacturing town, especially of woollens and textiles, located north of the Stirling and Dunfermline Railway, under the Ochil hills. The Alva Railway was incorporated by the Alva Railway Act 1861 (24 & 25 Vict. c. cxcv) on 22 July 1861; it was to be a branch to Alva from Cambus on the main line, with an intermediate station at Menstrie. It opened on 11 June 1863. says 3 June. There was an important distillery at Glenochil, near Menstrie.

The Alva Railway merged with the by the Edinburgh and Glasgow and Alva Railways Amalgamation Act 1864 (27 & 28 Vict. c. lxxxi) of 23 June 1864, with effect from 31 July 1864. The line had a busy passenger service, nine daily departures in 1922 and 10 in 1949 with a late Saturdays-only service from Alloa to Alva and back.