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
